Hello,
I would like move in QWebView, I disable scrolling vertical and horizontal and I want to use my finger to scroll QWebView same browser on touch device.
kinetic finger scrolling on ? enable ?
Someone can help me ?
Hello,
I would like move in QWebView, I disable scrolling vertical and horizontal and I want to use my finger to scroll QWebView same browser on touch device.
kinetic finger scrolling on ? enable ?
Someone can help me ?
I'm back,
I see that @remy_david did in the exemple.
How do i implement the code in mine? I followed the tutorial "Porting WRT To Qt Applications"
wrtwidgetwindow.cpp :
#include "wrtwidgetwindow.h"
#include <QtGui/QFrame>
#include <QtGui/QVBoxLayout>
#include <QtWebKit/QWebView>
#include <QApplication>
#include <QtWebKit/QWebFrame>
#include <QtWebKit/QWebSettings>
WRTWidgetWindow::WRTWidgetWindow(QWidget *parent)
: QMainWindow(parent)
{
setupUI();
}
WRTWidgetWindow::~WRTWidgetWindow()
{
webView->deleteLater();
}
void WRTWidgetWindow::setupUI()
{
QFrame* cw = new QFrame(this);
setCentralWidget(cw);
QVBoxLayout* layout = new QVBoxLayout(cw);
cw->setLayout(layout);
webView = createWebView();
layout->addWidget(webView);
}
void WRTWidgetWindow::close()
{
QApplication::exit();
}
void WRTWidgetWindow::addJavaScriptObject()
{
this->webView->page()->mainFrame()->addToJavaScriptWindowObject("clientApp",this);
}
QWebView* WRTWidgetWindow::createWebView()
{
QWebView* view = new QWebView(this);
view->settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
view->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
view->page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
view->mouseMoveEvent();
connect(view->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),this, SLOT(addJavaScriptObject()));
view->load(QUrl("qrc:/html/index.html"));
return view;
}
I believe the code in other thread is re-usable without any modifications.
so I must use
void MyListView::mouseReleaseEvent(QMouseEvent * mouseEvent)
{
isPressed = false;
if( !isMoving )
emit(selected(indexAt(lastPressPoint)));
}
... but what's MyListView ?
I'm sorry if I'm bad
I'm only web developer.
I trie to migrate in development web mobile, I create application with WRT but it's very slow.
I have a video where application with QWebView use kinetic scrolling
http://www.izlesene.com/video/nokia-...ebview/3015927
Was anyone able to do the scrolling in the video ?
vruno