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

Outer drag.filterChildren fails to activate dragging if inner edge dragged towards outside

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.15.1
    • None
    • Linux/X11

      In the following example, we have outer/inner MouseArea of the same size,
      and the outer MouseArea handles drag events.

      If we grab the edge of the inner MouseArea and drag it towards outside of
      the outer MouseArea at least drag.threshold px, dragging doesn't start.
      That's probably because the outer MouseArea doesn't receive child mouse events
      outside of the item rect, and the drag doesn't start until mouse moves drag.threshold px.

              MouseArea {
                  id: outerArea
                  drag.filterChildren: true
                  drag.target: panel
                  drag.axis: Drag.XAxis | Drag.YAxis
                  drag.threshold: 10
      
                  // This may be a TabButton in real-world application.
                  MouseArea {
                      id: innerArea
                      anchors.fill: parent
                  }
              }
      

      (full source code is attached)

      STR:
      1. qmlscene drag-filter-children-edge-case.qml
      2. click bottom edge and drag it down.

      Workaround:
      Expand the outer MouseArea while containsPress && !drag.active to receive mouse events.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jirauser52013 user-c858f (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes