QML_RUNTIME_TESTING should be disabled by default.
[profile/ivi/qtdeclarative.git] / tests / auto / qtquick2 / qquickpathview / data / pathline.qml
1 import QtQuick 2.0
2
3 Rectangle {
4     id: app
5     width: 360
6     height: 360
7
8     PathView {
9         id: pathView
10         objectName: "view"
11         x: (app.width-pathView.width)/2
12         y: 100
13         width: 240
14         height: 100
15
16         model: testModel
17
18         Rectangle {
19             anchors.fill: parent
20             color: "white"
21             border.color: "black"
22         }
23         preferredHighlightBegin: 0.5
24         preferredHighlightEnd: 0.5
25
26         delegate: Rectangle {
27             objectName: "wrapper"
28             width: 100
29             height: 100
30             color: PathView.isCurrentItem ? "red" : "yellow"
31             Text {
32                 text: index
33                 anchors.centerIn: parent
34             }
35             z: (PathView.isCurrentItem?1:0)
36         }
37         path: Path {
38             id: path
39             startX: -100+pathView.width/2
40             startY: pathView.height/2
41             PathLine {
42                 id: line
43                 x: 100+pathView.width/2
44                 y: pathView.height/2
45             }
46         }
47     }
48 }