aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml
blob: 1322025622e82a2f70f5aaa7c1403566a0b79a4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import QtQuick 1.0

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"
            property bool onPath: PathView.onPath
            width: 20; height: 20; color: name
            Text {
                objectName: "myText"
                text: name
            }
        }
    }

    path: Path {
        startX: 120; startY: 20;
        PathLine { x: 120; y: 300 }
    }
}