OSDN Git Service

QmlDesigner.tests: adding a new testfile
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Tue, 24 May 2011 15:22:10 +0000 (17:22 +0200)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>
Tue, 24 May 2011 15:23:18 +0000 (17:23 +0200)
Change-Id: I1de64b5ddb2262a08e7a50f368a7412b11c1f60d
Reviewed-on: http://codereview.qt.nokia.com/94
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
tests/manual/qml/testfiles/listview.qml [new file with mode: 0644]

diff --git a/tests/manual/qml/testfiles/listview.qml b/tests/manual/qml/testfiles/listview.qml
new file mode 100644 (file)
index 0000000..9cceba8
--- /dev/null
@@ -0,0 +1,44 @@
+import QtQuick 1.0
+
+Item {
+    width: 200
+    height: 100
+
+    ListView {
+        anchors.fill: parent;
+        model:  ListModel {
+            ListElement {
+                name: "BMW"
+                speed: 200
+            }
+            ListElement {
+                name: "Mercedes"
+                speed: 180
+            }
+            ListElement {
+                name: "Audi"
+                speed: 190
+            }
+            ListElement {
+                name: "VW"
+                speed: 180
+            }
+        }
+
+
+        delegate:  Item {
+            height:  40
+            Row {
+                spacing: 10
+                Text {
+                    text: name;
+                    font.bold: true
+                }
+
+                Text { text: "speed: " + speed }
+            }
+
+
+        }
+    }
+}