summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-10-21 03:17:38 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-10-21 03:17:38 (GMT)
commit504f0401f22323f88cb1390d2f315204f98fff26 (patch)
tree61748f070390b3a3f94fd9e5343405b74a444935 /doc/src/snippets
parent8214235eac6a3ca5dbe18558aea29c613a07b34f (diff)
parent2b469742848c6cb26daab9d5c72e512473dede2b (diff)
downloadQt-504f0401f22323f88cb1390d2f315204f98fff26.zip
Qt-504f0401f22323f88cb1390d2f315204f98fff26.tar.gz
Qt-504f0401f22323f88cb1390d2f315204f98fff26.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]