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

DragHandler doesn't play well with ListView and Buttons

    XMLWordPrintable

Details

    • All

    Description

      It seems that is not possible to have a DragHandler in a parent item and handle the following scenario:

      1. One DragHandler in parent Item "Rect1"
      2. "Rect1" contains both a ListView ("ListView1") and a
        Button ("Button1")
      3. The user would like to being able to scroll "ListView1" without
        triggering "Rect1" DragHandler but being able to drag
        "Rect1" when drag is done over "Button1"

      In other words we would like to have DragHandler that win over Buttons but lose with ListViews or child DragHandlers.

      The funny or absurd thing is that using a TapHandler doesn't causes the same effects of a Button.
      Where a Button seems to take the grab a TapHandler doesn't prevent the parent DragHandler to start the drag gesture.
      Maybe the Button should be ported to TapHandlers? or maybe the DragHandler grabPermissions policies must be increased with ListViews and Flickable items.

       

      IMPORTANT: for testing this bug report you need a device that sends touch events. With mouse is not reproducible

       

       

      Attachments

        1. biggerDragThreshold.qml
          0.8 kB
        2. buttonWithTapHandler.qml
          2 kB
        3. Test.qml
          1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-79238
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              cuke Filippo Cucchetto
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change