Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
-
52c1d7a994216f0b37ac04a2fea4337bc0c7550b
Description
With the following code, press space to execute move(5, 13, 3).
The last three items become
- 13 (Item 5)
- 16 (Item 16)
- 17 (Item 17)
when they should instead be
- 13 (Item 5)
- 14 (Item 6)
- 15 (Item 7)
import QtQuick 2.0 Item { width: 600; height: 600 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 { border.width: 1 width: 200; height: 20; Row { Text { text: name + " : " + index + " : " } Text { text: " " + parent.parent.x + ", " + parent.parent.y } } objectName: name } focus: true Keys.onSpacePressed: { model.move(5, 13, 3) } } Rectangle { anchors.fill: view2 color: "lightsteelblue" opacity: 0.3 } Text { anchors.right: parent.right; text: "content y:" + view2.contentY + ", count: " + model2.count }// + " " + view2.count } }