summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativerepeater.cpp
diff options
context:
space:
mode:
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