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

Views fail to signal change in movement

XMLWordPrintable

      Run the code below. Drag or flick the list an note how "Movement started" and "Movement ended" is printed as expected.
      Now click on an item and note how the list moves without onMovementStarted/onMovementEnded being signaled.

      import QtQuick 1.1
      
      Rectangle {
          width: 360
          height: 480
      
          ListView {
              anchors.fill: parent
              model: 200
              preferredHighlightBegin: 20
              preferredHighlightEnd: 20
              highlightRangeMode: ListView.StrictlyEnforceRange
              delegate: Rectangle {
                  color: index % 2 ? "gray" : "lightgray"
                  width: 360
                  height: 40
                  MouseArea {
                      anchors.fill: parent
                      onClicked: parent.ListView.view.currentIndex = index
                  }
      
              }
              onMovementStarted: print("Movement started")
              onMovementEnded: print("Movement ended")
          }
      }
      

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

            Unassigned Unassigned
            mathiasm Mathias Malmqvist
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes