Qt 5.1 QWebView Mouse Clicks Work but not Touch Clicks, but both work in Qt 4.8 QWebView



  • Hi,

    I made an Windows 7 application on a QWidget that has an embedded QWebView.
    I originally made it for Qt 4.8, and ported it to Qt 5.1 recently.

    In Qt 4.8, on a Windows 7 Touch device, mouse clicking and touching the screen both result as a mouse click.

    However, on Qt 5.1, mouse clicking and touching the screen still have the same result in my Application except with the QWebView. In the QWebView, mouse clicks work fine, but touching only highlights the link but no click is done. Everywhere else in my Application, touching works the same as the mouse clicks.

    Is there some setting I must set? Here is my code for setting up the QWebView embedded browser:

    @
    QWebView * embeddedBrowser = new QWebView(this);
    embeddedBrowser->setGeometry(embeddedBrowserRect);
    embeddedBrowser->setVisible(true);
    embeddedBrowser->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
    embeddedBrowser->setAttribute(Qt::WA_AcceptTouchEvents);
    embeddedBrowser->setAttribute(Qt::WA_InputMethodEnabled);
    embeddedBrowser->setAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents);
    connect(embeddedBrowser, SIGNAL(linkClicked(QUrl)), this, SLOT(browserLinkClicked(QUrl)));
    connect(embeddedBrowser, SIGNAL(loadProgress(int)), this, SLOT(browserLoadProgress(int)));
    connect(embeddedBrowser, SIGNAL(selectionChanged()), this, SLOT(browserSelectionChanged()));
    embeddedBrowser->setEnabled(true);
    @

    What am I missing? And thank you very much for any help. I really appreciate it,
    e_dunstan


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.