Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.0, 5.10.1
Description
ListView { id: list clip: true model: 20 width: 200 height: 400 spacing: 20 snapMode: ListView.SnapToItem delegate: Rectangle { width: 200 height: 100 border.color: "blue" Text { anchors.centerIn: parent font.pixelSize: 25 text: index } } } Button { font.pixelSize: 20 text: list.contentY.toFixed(0) onClicked: { list.returnToBounds() } }
Scroll the list so that the contentY is between 50 (delegate.height / 2) and 70 (delegate.height / 2 + list.spacing) (Similarly for other elements.)
Expected result: The ListView settles with second item aligned with the start of the ListView.
Observed result: Nothing happens. (Calling returnToBounds() also does nothing.)