diff options
Diffstat (limited to 'tests/auto/qtquick1/qdeclarativelistview/data/qtbug16037.qml')
-rw-r--r-- | tests/auto/qtquick1/qdeclarativelistview/data/qtbug16037.qml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/auto/qtquick1/qdeclarativelistview/data/qtbug16037.qml b/tests/auto/qtquick1/qdeclarativelistview/data/qtbug16037.qml new file mode 100644 index 0000000000..0756618a60 --- /dev/null +++ b/tests/auto/qtquick1/qdeclarativelistview/data/qtbug16037.qml @@ -0,0 +1,37 @@ +import QtQuick 1.0 + +Item { + width: 640 + height: 480 + + function setModel() { + listView.model = listModel1 + } + + ListModel { + id: listModel1 + ListElement { text: "Apple" } + ListElement { text: "Banana" } + ListElement { text: "Orange" } + ListElement { text: "Coconut" } + } + + Rectangle { + width: 200 + height: listView.contentHeight + color: "yellow" + anchors.centerIn: parent + + ListView { + id: listView + objectName: "listview" + anchors.fill: parent + + delegate: Item { + width: 200 + height: 20 + Text { text: model.text; anchors.centerIn: parent } + } + } + } +} |