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

TapHandler and DragHandler interoperability breaks

    XMLWordPrintable

Details

    • Linux/X11
    • 7b8bea13e (dev), 07e0138fa (6.7), 1c7ada23e (6.6), 75512d6cd (tqtc/lts-6.5), c79309ed7 (tqtc/lts-6.2)
    • G&UI Finishing 2023

    Description

      Our use case - We have touch screen consoles running a Qt Quick application. This application can be multi-layered (in the z-ordering sense), where different sections of the UI can overlap other sections. For example, a pull-down 'Drawer' can contain a 'ListView' of items (which too can utilise tap/drag handlers) that in turn partially cover the applications main view. This main view itself can have DragHandlers and TapHandlers for opening other drawer like objects, or for tapping buttons.

      The issue is that TapHandlers and DragHandlers are propagating input events to handlers below the top level handlers, effectively giving multiple exclusive grabs sometimes, but not at other times. For example, tapping on an item in the top level Drawer's ListView could also trigger a tap on a TapHandler on the main view simultaneously. A critical point here is these inconsistencies persist for any particular restart of the application. If the application launches in a state where tap or drag events propagate successfully (undesirable) from top level handlers to lower ones, it will remain in this state for the remainder of the session. Likewise, if the application launches in a state where tap or drag events do not propagate from the top level handlers, the application is interactive in a correct manner for the entirety of this session.

      To reproduce the issue please run the attached example project. It is worth noting that it's sometimes difficult to trigger the broken state on restart. It appears to occur more often after a fresh build.

      The other issue that can be seen with the example is that a vertical drag of a ListView nested inside a pull-down 'Drawer' often do not work properly together - mouse input drags both the listview and drawer simultaneously, whereas touch drag tends to scroll the ListView first before the drawer but even that is not as reliable as it could be.

      Even when not in the broken state, the drag gesture does reliably go through the Drawer. In the test app, if you slide one of the buttons on the drawer out of the way, and then drag gesture left/right in the vacant space created, the panel on the left will open/close each time.

      Attachments

        1. Click through state.mp4
          89 kB
        2. Demo broken state with click through.mp4
          307 kB
        3. Double finger tap.mp4
          9.10 MB
        4. Initial taps.mp4
          5.24 MB
        5. No click through state.mp4
          43 kB
        6. qtbug_117387.zip
          241 kB

        Issue Links

          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
              tuomas.vaarala Tuomas Vaarala
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: