Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85427

HoverHandler with acceptedDevices:PointerDevice.Mouse reacts to touch events

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.14.2, 6.4.0 Beta1
    • None
    • Android, Linux/Wayland

    Description

      When a HoverHandler is defined with acceptedDevices: PointerDevice.Mouse it also receives touch events.

      This makes it hard to have mouse specific interaction on tactile screens, as every touch will also trigger a mouse interaction.

      The following sample code (adapted from https://doc.qt.io/qt-5/qml-qtquick-hoverhandler.html#acceptedDevices-prop) demonstrates the issue.

      • Interaction with mouse -> prints mouse
      • Interaction with touch screen -> prints touch screen and mouse alternating
      • Interaction with stylus -> prints mouse (Lenovo X1 Yoga tested with Fedora 32, might be solved by 8e822e98 or an issue on a different layer. I can open a separate issue if requested.)
      Item {
         HoverHandler {
             acceptedDevices: PointerDevice.Mouse
             onHoveredChanged: console.log("mouse")
         }
         HoverHandler {
             acceptedDevices: PointerDevice.Stylus
             onHoveredChanged: console.log("stylus")
         }
         HoverHandler {
             acceptedDevices: PointerDevice.TouchScreen
             onHoveredChanged: console.log("touch screen")
         }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mkuhn Matthias Kuhn
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes