aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qquicklistview/data/qtbug16037.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtquick2/qquicklistview/data/qtbug16037.qml')
-rw-r--r--tests/auto/qtquick2/qquicklistview/data/qtbug16037.qml37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/auto/qtquick2/qquicklistview/data/qtbug16037.qml b/tests/auto/qtquick2/qquicklistview/data/qtbug16037.qml
new file mode 100644
index 0000000000..21faeb3f32
--- /dev/null
+++ b/tests/auto/qtquick2/qquicklistview/data/qtbug16037.qml
@@ -0,0 +1,37 @@
+import QtQuick 2.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 }
+ }
+ }
+ }
+}