Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.8, 6.8.2, 6.9.0 Beta2
-
None
-
Windows 10 22H2
Description
Code
import QtQuick import QtQuick.Controls.Basic Window { id: root width: 640 height: 480 visible: true property int lastIndex: 4 Column { ListView { id: listView width: 100 height: 200 model: root.lastIndex + 1 currentIndex: root.lastIndex clip: true delegate: Label { required property int index width: ListView.view.width height: ListView.view.height text: index verticalAlignment: Qt.AlignVCenter } } Button { text: "Decrement" onClicked: listView.currentIndex-- } Button { text: "Slow Reset" onClicked: listView.currentIndex = root.lastIndex } Button { text: "Fast Reset 1" onClicked: { listView.currentIndex = root.lastIndex listView.positionViewAtIndex(root.lastIndex, ListView.Beginning) // OR positionViewAtEnd() } } Button { text: "Fast Reset 2" onClicked: { listView.positionViewAtIndex(root.lastIndex, ListView.Beginning) // OR positionViewAtEnd() listView.currentIndex = root.lastIndex } } } }
Steps to reproduce
In the steps below, wait for the animations to complete before making the next click:
- Build and run the code above
- Click "Decrement" repeatedly until the view reaches 0
- Click "Slow Reset"
- Click "Decrement" repeatedly until the view reaches 0
- Click "Fast Reset 1"
- Click "Decrement" repeatedly until the view reaches 0
- Click "Fast Reset 2"
- Click "Decrement" repeatedly until the view reaches 0
Outcomes
- (Steps #2, #4, #6) Each click smoothly animates to the next item (Expected)
- (Step #3) The view smoothly animates to "4" (Expected)
- (Steps #5, #7) The view quickly snaps to "4" (Expected)
- (Step #8) The first 2 clicks abruptly jump to the next item (Not Expected); the remaining clicks behave as expected
"Fast Reset 1" and "Fast Reset 2" perform the same operations, just in different orders. Neither should be considered wrong.
Attachments
Issue Links
- relates to
-
QTBUG-134120 Tumbler is unable to rapidly snap to a new position
-
- Reported
-