summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlgraphicspathview/data/datamodel.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlgraphicspathview/data/datamodel.qml')
-rw-r--r--tests/auto/declarative/qmlgraphicspathview/data/datamodel.qml36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlgraphicspathview/data/datamodel.qml b/tests/auto/declarative/qmlgraphicspathview/data/datamodel.qml
new file mode 100644
index 0000000..8d07db2
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspathview/data/datamodel.qml
@@ -0,0 +1,36 @@
+import Qt 4.6
+
+PathView {
+ id: pathview
+ objectName: "pathview"
+ width: 240; height: 320
+ pathItemCount: testObject.pathItemCount
+
+ function checkProperties() {
+ testObject.error = false;
+ if (testObject.useModel && pathview.model != testData) {
+ console.log("model property incorrect");
+ testObject.error = true;
+ }
+ }
+
+ model: testObject.useModel ? testData : 0
+
+ delegate: Component {
+ id: myDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ width: 20; height: 20; color: name
+ Text {
+ objectName: "myText"
+ text: name
+ }
+ }
+ }
+
+ path: Path {
+ startX: 120; startY: 20;
+ PathLine { x: 120; y: 300 }
+ }
+}