summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativelistview.cpp
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 /src/declarative/graphicsitems/qdeclarativelistview.cpp
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 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 86c8756..702442b 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1416,6 +1416,13 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
+ ListView attaches a number of properties to the root item of the delegate, for example
+ \c {ListView.isCurrentItem}. In the following example, the root delegate item can access
+ this attached property directly as \c ListView.isCurrentItem, while the child
+ \c contactInfo object must refer to this property as \c wrapper.ListView.isCurrentItem.
+
+ \snippet doc/src/snippets/declarative/listview/listview.qml isCurrentItem
+
\note Views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped