diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/qdeclarativemodels.qdoc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index e80824d..5fd2799 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -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 |