Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Long press from touch screen is handled different from long mouse press

Long press from touch screen is handled different from long mouse press

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 584 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marc_Van_Daele
    wrote on last edited by
    #1

    We have a website that uses long-presses. When accessing this website from a WebEngineView in QML, we note that

    • a long-mouse-press is handled correctly
    • a long-touch-press gets translated to a right click

    Note that we see the same behavior when accessing this webpage directly from Chromium. It works fine when opening this webpage from Firefox.

    I assume that this happens because the long-touch-presses have mouse.source=Qt.MouseEventSynthesizedByQt while long-mouse-presses have mouse.source==Qt.MouseEventNotSynthesized

    So I would like to make this webpage work in WebEngineView .
    Which options do you see?

    One option I see is to recompile Qt and remove MouseEventSynthesizedByQt. This is new to me so what is the best/suggested approach here?
    Change (in qevent.cpp)

    Qt::MouseEventSource QMouseEvent::source() const
    {
        return Qt::MouseEventNotSynthesized; //QGuiApplicationPrivate::mouseEventSource(this);
    }
    

    or replace the limited number (< 10) of occurences where MouseEventSynthesizedByQt is used by MouseEventNotSynthesized?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved