Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.0
-
None
-
01daf72ee66fb3fb5d9378ecaa42c9ace8bc6c76
Description
With the following, press space to execute a move(10, 0, 2).
Observe Item 11 is now at the top of the list at (0,0) and Item 10 is at (0, -20).
Instead, Item 10 should be at (0,0) and Item 11 should be at (0, 20).
import QtQuick 2.0 Item { width: 500; height: 500 ListView { id: view2 width: 240; height: 320 x: 100 y: 100 model: ListModel { id: model2 Component.onCompleted: { for (var i=0; i<30; i++) { append({'name': 'item ' + i}) } } } delegate: Rectangle { width: 200; height: 20; border.width: 1 Row { Text { text: name + " : " + index + " : " } Text { text: " " + parent.parent.x + ", " + parent.parent.y } } objectName: name } focus: true Keys.onSpacePressed: { model.move(10, 0, 2) } } Rectangle { anchors.fill: view2 color: "lightsteelblue" opacity: 0.3 } Text { anchors.right: parent.right; text: "content y:" + view2.contentY + ", count: " + model2.count } }