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

Flickable moving and dragging properties return false on first move.

    XMLWordPrintable

Details

    Description

      Flickable does not update it's dragging and moving properties until after it has moved the content item the first time. This can make it difficult to detect whether a change in the content item position was due to user interaction or something else.

      In the example below, ideally the debug output would print true for both properties on all changes while dragging but instead the first message prints false for both and corrects itself from then on.

      import QtQuick 2.0
      
      Flickable {
        width: 300
        height: 300
      
        contentHeight: 320
      
        onContentYChanged: console.log("content y changed", moving, dragging)
        
      
        Rectangle { 
          anchors.fill: parent
          anchors.margins: 10
          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:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes