Important: Please read the Qt Code of Conduct -

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);
    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()));

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

Log in to reply