aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/data/parentBinding.qml
blob: b56372888dadec448cac7980f7e565aae5b8cd95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import QtQuick 2.0

ListView {
    width: 320; height: 480
    model: ListModel {}
    cacheBuffer: 300
    delegate: Rectangle {
        objectName: "wrapper"
        width: parent.width
        height: parent.parent.height/12
        color: index % 2 ? "red" : "blue"
    }
    Component.onCompleted: {
        for (var i = 0; i < 100; ++i)
            model.append({"foo":"bar"+i})
    }
}