Views do not notify count changes properly
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativepathview / data / datamodel.qml
1 import QtQuick 1.0
2
3 PathView {
4     id: pathview
5     property int viewCount: count
6     objectName: "pathview"
7     width: 240; height: 320
8     pathItemCount: testObject.pathItemCount
9
10     function checkProperties() {
11         testObject.error = false;
12         if (testObject.useModel && pathview.model != testData) {
13             console.log("model property incorrect");
14             testObject.error = true;
15         }
16     }
17
18     model: testObject.useModel ? testData : 0
19
20     delegate: Component {
21         id: myDelegate
22         Rectangle {
23             id: wrapper
24             objectName: "wrapper"
25             property bool onPath: PathView.onPath
26             width: 20; height: 20; color: name
27             Text {
28                 objectName: "myText"
29                 text: name
30             }
31         }
32     }
33
34     path: Path {
35         startX: 120; startY: 20;
36         PathLine { x: 120; y: 300 }
37     }
38 }