summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativerepeater.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-05-31 06:59:48 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-05-31 07:00:42 (GMT)
commit4759e47a2444d481156ad1a789e5affbc92e1b58 (patch)
treed4c418c0da23c7ad4ab595475cd71a89075a2249 /src/declarative/graphicsitems/qdeclarativerepeater.cpp
parente5cc765d2fa1ff68f1592ad475d6b8f4e5a6f667 (diff)
downloadQt-4759e47a2444d481156ad1a789e5affbc92e1b58.zip
Qt-4759e47a2444d481156ad1a789e5affbc92e1b58.tar.gz
Qt-4759e47a2444d481156ad1a789e5affbc92e1b58.tar.bz2
Various doc fixes and improvements
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativerepeater.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 04076f8..691cfa2 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -80,14 +80,20 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
The index is always exposed as an accessible \c index property.
In the case of an object or string list, the data element (of type string
or object) is available as the \c modelData property. In the case of a Qt model,
- all roles are available as named properties just like in the view classes. The
- following example shows how to use the index property inside the instantiated
- items.
+ all roles are available as named properties just like in the view classes.
- \snippet doc/src/snippets/declarative/repeater-index.qml 0
+ The following example shows how to use the \c index property inside the instantiated
+ items:
+ \snippet doc/src/snippets/declarative/repeater-index.qml 0
\image repeater-index.png
+ The repeater could also use the \c modelData property to reference the data for a
+ particular index:
+
+ \snippet doc/src/snippets/declarative/repeater-modeldata.qml 0
+ \image repeater-modeldata.png
+
Items instantiated by the Repeater are inserted, in order, as
children of the Repeater's parent. The insertion starts immediately after
the repeater's position in its parent stacking list. This is to allow