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

Flickable shouldn't grab the mouse until it actually moves it's contentItem.

    XMLWordPrintable

Details

    Description

      This is the same as QTBUG-29717 but for Flickable instead of MouseArea

      Flickable will currently grab the mouse if there is detects any drag in a flickable direction preventing nested mouse areas or flickables from recognizing drag gestures in opposite directions along the same axis.

      If a flickable is not going to respond to an initial drag because it aligned to an edge and the boundsBehavior is StopAtBounds or it shouldn't grab the mouse, so that in the following example you can drag the blue rectangle around within the yellow, but if it's aligned with a boundary of the yellow rectangle and you drag in the direction of the boundary the yellow rectangle should be moved instead.

      import QtQuick 2.0
      
      Flickable {
          id: outer
          objectName: "outerFlickable"
          width: 400
          height: 400
          contentX: 50
          contentY: 50
          contentWidth: 500
          contentHeight: 500
          flickableDirection: inner.flickableDirection
      
          Rectangle {
              x: 100
              y: 100
              width: 300
              height: 300
      
              color: "yellow"
              Flickable {
                  id: inner
                  objectName: "innerFlickable"
                  anchors.fill: parent
                  contentX: 100
                  contentY: 100
                  contentWidth: 400
                  contentHeight: 400
                  boundsBehavior: Flickable.StopAtBounds
                  Rectangle {
                      anchors.fill: parent
                      anchors.margins: 100
                      color: "blue"
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes