From 79e4a9e9f47cc218c13cabba43c0f806d72cc84a Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 9 Apr 2010 14:18:39 +1000 Subject: Fix example Task-number: QTBUG-8514 --- doc/src/declarative/qdeclarativemodels.qdoc | 22 +++++++++++++++------- 1 file 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 -- cgit v0.12