Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Touchscreen "HOLD" (long-press) event gets converted to a right-mouse-button press

Touchscreen "HOLD" (long-press) event gets converted to a right-mouse-button press

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 448 Views
  • 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
    MajorNinth
    wrote on 25 Jul 2024, 18:32 last edited by
    #1

    Short and long on-screen "button presses" using a mouse work as expected -- that is, we see a difference between a short activation (call it a "tap") vs. a long one of 0.5 seconds or longer (a "hold").

    However, we can't see the expected differentiation between short/long activations when using touch screens. Qt converts touchscreen events into mouse events, but a touchscreen hold (long press) appears to become a right button press.

    We're using Qt 5.14.2. The application is running on Windows 11.

    Any advice would be appreciated. For example, if a newer version of the underlying Qt function works but the older one doesn't, we could presumably write our own function that mimics the changes, etc.

    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Jul 2024, 18:44 last edited by
      #2

      Hi and welcome to devnet,

      Did you already test with Qt 6 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply 25 Jul 2024, 19:31
      0
      • S SGaist
        25 Jul 2024, 18:44

        Hi and welcome to devnet,

        Did you already test with Qt 6 ?

        M Offline
        M Offline
        MajorNinth
        wrote on 25 Jul 2024, 19:31 last edited by
        #3

        @SGaist

        No, we haven’t tested with QT6. This particular product is fairly mature, with a lot of associated software that also uses an older QT version. It would be very disruptive to change versions in this case.

        I was hoping someone would be familiar with this bug and have a suggestion for a workaround. Perhaps a different function? A modification drawing on changes in a newer QT version? Etc.

        Thanks

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Axel Spoerl
          Moderators
          wrote on 29 Jul 2024, 12:07 last edited by
          #4

          If memory serves well, this has been a long standing issue since the old days of Qt 4.
          The underlying problem is that converting touch events into mouse events is a compromise. Making everything work as expected for all touch screen types is like nailing jelly to a tree :-)
          I that particular case, nobody ever added reproducing steps to the bug report, so it was closed. I remember to have experienced it in Qt5 (probably 5.15.x), but not in Qt 6.

          Qt 5.14 is really outdated. The only workaround that comes to mind, is to actually implement touch behavior without relying on mouse event translation. That requires specific implementation for each platform, by using native event filters.

          Software Engineer
          The Qt Company, Oslo

          1 Reply Last reply
          2

          3/4

          25 Jul 2024, 19:31

          • Login

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