diff options
Diffstat (limited to 'tests/auto/declarative/qmlvisual/ListView/basic4.qml')
-rw-r--r-- | tests/auto/declarative/qmlvisual/ListView/basic4.qml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/ListView/basic4.qml b/tests/auto/declarative/qmlvisual/ListView/basic4.qml new file mode 100644 index 0000000000..2c5d1e3eae --- /dev/null +++ b/tests/auto/declarative/qmlvisual/ListView/basic4.qml @@ -0,0 +1,36 @@ +import QtQuick 1.0 + +Rectangle { + color: "blue" + width: 200 + height: 300 + id: page + ListModel { + id: model + ListElement { + name: "palegoldenrod" + } + ListElement { + name: "lightsteelblue" + } + } + Component { + id: delegate + Rectangle { + color: "red" + width: 100 + height: 100 + Rectangle { + anchors.centerIn: parent + width: 60 + height: 60 + color: name + } + } + } + ListView { + anchors.fill: parent + model: model + delegate: delegate + } +} |