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

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

    XMLWordPrintable

Details

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

    Description

      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.

      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
            jirauser52013 user-c858f (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes