diff options
Diffstat (limited to 'tests/auto/declarative/qmlvisual/repeater/basic4.qml')
-rw-r--r-- | tests/auto/declarative/qmlvisual/repeater/basic4.qml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/repeater/basic4.qml b/tests/auto/declarative/qmlvisual/repeater/basic4.qml new file mode 100644 index 0000000000..c7c0d29682 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/repeater/basic4.qml @@ -0,0 +1,37 @@ +import QtQuick 1.0 + +Rectangle { + color: "white" + width: 120 + height: 240 + id: page + ListModel { + id: model + ListElement { + name: "palegoldenrod" + } + ListElement { + name: "lightsteelblue" + } + } + Component { + id: delegate + Rectangle { + color: "thistle" + width: 100 + height: 100 + Rectangle { + anchors.centerIn: parent + width: 60 + height: 60 + color: name + } + } + } + Column{ + Repeater{ + model: model + delegate: delegate + } + } +} |