Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT QWebEngineView : How to inject touch events (touchstart, touchmove, touchend) ?



  • I would like to inject touch events such as "touchstart", "touchmove", "touchend" into the QWebEngineView. Then, I should be able to capture the events in my html page running in the webview for example using jquery like below :

    $(document).on("touchstart",function() {
    console.log("Touchstart");
    });
    I tried using QMouseEvents as explained in this SO answer and it works. But not the QTouchEvents.

    Any suggestions ?


  • Lifetime Qt Champion

    Hi
    is setAttribute(Qt::WA_AcceptTouchEvents, true);
    set pr default for QWebEngineView ?



  • Hello,

    Yes. I have set that attribute to true already. Still doesn't work.

    Regards,
    Raghav


Log in to reply