summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-22 01:59:33 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-22 01:59:33 (GMT)
commit6c9ac788a60fcd2f946787a5297d7c2f71ad1968 (patch)
treeaf53424d7d2adfcbb324624ab93d31845d3db80d /doc/src/snippets
parent2391cf5d127882ce8811e058115d5c2605328079 (diff)
parentfa85d539decf7bdcb16fa8f52858b13479cea659 (diff)
downloadQt-6c9ac788a60fcd2f946787a5297d7c2f71ad1968.zip
Qt-6c9ac788a60fcd2f946787a5297d7c2f71ad1968.tar.gz
Qt-6c9ac788a60fcd2f946787a5297d7c2f71ad1968.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/declarative/listview/highlight.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml
index 2234ee7..7970ede 100644
--- a/doc/src/snippets/declarative/listview/highlight.qml
+++ b/doc/src/snippets/declarative/listview/highlight.qml
@@ -20,6 +20,18 @@ Rectangle {
Text { text: '<b>Name:</b> ' + name }
Text { text: '<b>Number:</b> ' + number }
}
+ // Use the ListView.isCurrentItem attached property to
+ // indent the item if it is the current item.
+ states: [
+ State {
+ name: "Current"
+ when: wrapper.ListView.isCurrentItem
+ PropertyChanges { target: wrapper; x: 10 }
+ }
+ ]
+ transitions: [
+ Transition { NumberAnimation { properties: "x"; duration: 200 } }
+ ]
}
}
//! [0]