summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/listview
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-12-23 05:01:58 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-12-23 05:01:58 (GMT)
commit508d52477fe16f3b425e5d3ec65584e86ed939b3 (patch)
treea59646329e915930777381c290715c82864ff488 /doc/src/snippets/declarative/listview
parent16d08f97eaa7dd0469d7c9006546f86f1fd763f6 (diff)
downloadQt-508d52477fe16f3b425e5d3ec65584e86ed939b3.zip
Qt-508d52477fe16f3b425e5d3ec65584e86ed939b3.tar.gz
Qt-508d52477fe16f3b425e5d3ec65584e86ed939b3.tar.bz2
Improve docs on attached properties on view delegates.
Clarify that the properties are attached to the root of the delegate, and must be accessed as such by child items. Task-number: QTBUG-16193 Reviewed-by: Bea Lam
Diffstat (limited to 'doc/src/snippets/declarative/listview')
-rw-r--r--doc/src/snippets/declarative/listview/listview.qml14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml
index 8ba47a8..370429e 100644
--- a/doc/src/snippets/declarative/listview/listview.qml
+++ b/doc/src/snippets/declarative/listview/listview.qml
@@ -127,10 +127,16 @@ ListView {
Component {
id: contactsDelegate
- Text {
- id: contactInfo
- text: name + ": " + number
- color: contactInfo.ListView.isCurrentItem ? "red" : "black"
+ Rectangle {
+ id: wrapper
+ width: 180
+ height: contactInfo.height
+ color: ListView.isCurrentItem ? "black" : "red"
+ Text {
+ id: contactInfo
+ text: name + ": " + number
+ color: wrapper.ListView.isCurrentItem ? "red" : "black"
+ }
}
}