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

PathView steals mouse grab from child items.

XMLWordPrintable

      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
                  }
              }
          }
      }
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes