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

PathView steals mouse grab from child items.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.2.0
    • Labels:
      None

      Description

      PathView doesn't handle mouse grab correctly (where Flickable's handling is the definition of correct) which prevents items within a PathView delegate from receiving mouse grab and handling drag gestures.

      In the example below it should be possible to drag the yellow box left to right within the blue box, but instead the blue box is dragged along the path.

      import QtQuick 2.0
      
      PathView {
          width: 400
          height: 400
      
          model: 2
          path: Path {
              startX: -300
              startY: 200
              PathLine {
                  x: 700
                  y: 200
              }
          }
          delegate: Rectangle {
              width: 300
              height: 300
              border.width: 5
              color: "lightsteelblue"
      
              Rectangle {
                  x: 100
                  y: 100
                  width: 100
                  height: 100
      
                  color: "yellow"
      
                  MouseArea {
                      drag.target: parent
                      anchors.fill: parent
                  }
              }
          }
      }
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              andrew.den.exter Andrew den Exter
              Reporter:
              andrew.den.exter Andrew den Exter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes