summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/qdeclarativemodels.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/declarative/qdeclarativemodels.qdoc')
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc24
1 files changed, 16 insertions, 8 deletions
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index e80824d..d8b2a5d 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -54,7 +54,7 @@ delegate may bind to. The roles are exposed as properties of the
\e model context property, though this property is set as a default property
of the delegate so, unless there is a naming clash with a
property in the delegate, the roles are usually accessed unqualified. The
-example below would have a clash between he \e color role of the model and
+example below would have a clash between the \e color role of the model and
the \e color property of the Rectangle. The clash is avoided by referencing
the \e color property of the model by its full name: \e model.color.
@@ -309,13 +309,21 @@ There are no data roles.
The following example creates a ListView with five elements:
\code
-Component {
- id: itemDelegate
- Text { text: "I am item number: " + index }
-}
-ListView {
- model: 5
- delegate: itemDelegate
+Item {
+ width: 200
+ height: 250
+
+ Component {
+ id: itemDelegate
+ Text { text: "I am item number: " + index }
+ }
+
+ ListView {
+ anchors.fill: parent
+ model: 5
+ delegate: itemDelegate
+ }
+
}
\endcode