aboutsummaryrefslogtreecommitdiffstats
path: root/src/qtquick1/util/qdeclarativelistmodel.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-08-09 11:49:57 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-09 07:28:26 +0200
commit955c2b0f29dc709a5cc7e563c21f0f2cf2370336 (patch)
treefbfe91cf07bf03664ed6eb2fa0d0d435a076b3e2 /src/qtquick1/util/qdeclarativelistmodel.cpp
parent8c0c89a72a0ad463bde36c3d36f00cc5914721e1 (diff)
Copy the docs for QtQuick 1
Change-Id: Iaaaaaaa13726fa471f94fc7f809911164df24544 Reviewed-on: http://codereview.qt.nokia.com/2755 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/qtquick1/util/qdeclarativelistmodel.cpp')
-rw-r--r--src/qtquick1/util/qdeclarativelistmodel.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qtquick1/util/qdeclarativelistmodel.cpp b/src/qtquick1/util/qdeclarativelistmodel.cpp
index 520d9ac388..d5aa75bec5 100644
--- a/src/qtquick1/util/qdeclarativelistmodel.cpp
+++ b/src/qtquick1/util/qdeclarativelistmodel.cpp
@@ -115,7 +115,7 @@ QDeclarative1ListModelParser::ListInstruction *QDeclarative1ListModelParser::Lis
\inlineimage listmodel.png
\enddiv
- \snippet doc/src/snippets/declarative/listmodel.qml 0
+ \snippet doc/src/snippets/qtquick1/listmodel.qml 0
\clearfloat
Roles (properties) in each element must begin with a lower-case letter and
@@ -125,14 +125,14 @@ QDeclarative1ListModelParser::ListInstruction *QDeclarative1ListModelParser::Lis
Since the example model contains an \c id property, it can be referenced
by views, such as the ListView in this example:
- \snippet doc/src/snippets/declarative/listmodel-simple.qml 0
+ \snippet doc/src/snippets/qtquick1/listmodel-simple.qml 0
\dots 8
- \snippet doc/src/snippets/declarative/listmodel-simple.qml 1
+ \snippet doc/src/snippets/qtquick1/listmodel-simple.qml 1
It is possible for roles to contain list data. In the following example we
create a list of fruit attributes:
- \snippet doc/src/snippets/declarative/listmodel-nested.qml model
+ \snippet doc/src/snippets/qtquick1/listmodel-nested.qml model
The delegate displays all the fruit attributes:
@@ -140,7 +140,7 @@ QDeclarative1ListModelParser::ListInstruction *QDeclarative1ListModelParser::Lis
\inlineimage listmodel-nested.png
\enddiv
- \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate
+ \snippet doc/src/snippets/qtquick1/listmodel-nested.qml delegate
\clearfloat
\section1 Modifying List Models
@@ -148,7 +148,7 @@ QDeclarative1ListModelParser::ListInstruction *QDeclarative1ListModelParser::Lis
The content of a ListModel may be created and modified using the clear(),
append(), set(), insert() and setProperty() methods. For example:
- \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate
+ \snippet doc/src/snippets/qtquick1/listmodel-modify.qml delegate
Note that when creating content dynamically the set of available properties
cannot be changed once set. Whatever properties are first added to the model
@@ -905,12 +905,12 @@ bool QDeclarative1ListModelParser::definesEmptyList(const QString &s)
The following model defines a series of list elements, each of which
contain "name" and "cost" roles and their associated values.
- \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml model
+ \snippet doc/src/snippets/qtquick1/qml-data-models/listelements.qml model
The delegate obtains the name and cost for each element by simply referring
to \c name and \c cost:
- \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml view
+ \snippet doc/src/snippets/qtquick1/qml-data-models/listelements.qml view
\sa ListModel
*/