17f787c5950f139d923134e33c505f628f68fcb0
[profile/ivi/qtdeclarative.git] / tests / auto / quick / qquicklistview / data / flickBeyondBoundsBug.qml
1 import QtQuick 2.0
2
3 Rectangle {
4     id: root
5     width: 240
6     height: 320
7     color: "#ffffff"
8
9     Component {
10         id: myDelegate
11         Rectangle {
12             id: wrapper
13             objectName: "wrapper"
14             height: column.height
15             Column {
16                 id: column
17                 Text {
18                     text: "index: " + index + ", delegate A"
19                     Component.onCompleted: height = index % 2 ? 30 : 20
20                 }
21                 Text {
22                     x: 200
23                     text: wrapper.y
24                     height: 25
25                 }
26             }
27             color: ListView.isCurrentItem ? "lightsteelblue" : "#EEEEEE"
28         }
29     }
30     ListView {
31         id: list
32         objectName: "list"
33         focus: true
34         width: 240
35         height: 320
36         model: 2
37         delegate: myDelegate
38         cacheBuffer: 400
39     }
40     Text { anchors.bottom: parent.bottom; text: list.contentY }
41 }