diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-08 02:38:17 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-08 02:38:17 (GMT) |
commit | 2d3323d239c9d20c98e09c9398931e60bb799cca (patch) | |
tree | b5484d2eb06cfc60759e45f7b8fc82176ab09b07 /tests/auto/declarative/qdeclarativepathview/data | |
parent | 9bc81769eb6ebc9bd62fe3c1d86e67ddccbed8b6 (diff) | |
download | Qt-2d3323d239c9d20c98e09c9398931e60bb799cca.zip Qt-2d3323d239c9d20c98e09c9398931e60bb799cca.tar.gz Qt-2d3323d239c9d20c98e09c9398931e60bb799cca.tar.bz2 |
Add PathView.isCurrentIndex and PathView.view attached properties
Adding PathView attached properties to be in line with other views.
Task-number: QT-319
Diffstat (limited to 'tests/auto/declarative/qdeclarativepathview/data')
-rw-r--r-- | tests/auto/declarative/qdeclarativepathview/data/pathview.qml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview.qml index c5d88cd..ae0c86a 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview.qml @@ -1,6 +1,9 @@ import Qt 4.6 Rectangle { + id: root + property int currentA: -1 + property int currentB: -1 width: 240 height: 320 color: "#ffffff" @@ -12,7 +15,7 @@ Rectangle { objectName: "wrapper" height: 20 width: 60 - color: "white" + color: PathView.isCurrentItem ? "lightsteelblue" : "white" border.color: "black" Text { text: index @@ -29,6 +32,12 @@ Rectangle { objectName: "textNumber" text: number } + PathView.onCurrentItemChanged: { + if (PathView.isCurrentItem) { + root.currentA = index; + root.currentB = wrapper.PathView.view.currentIndex; + } + } } } ] |