diff options
Diffstat (limited to 'src/qml/qml/qquicklistmodel.cpp')
-rw-r--r-- | src/qml/qml/qquicklistmodel.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/qml/qquicklistmodel.cpp b/src/qml/qml/qquicklistmodel.cpp index 37f6e86cb8..15b39b2cb4 100644 --- a/src/qml/qml/qquicklistmodel.cpp +++ b/src/qml/qml/qquicklistmodel.cpp @@ -1380,7 +1380,7 @@ QQuickListModelParser::ListInstruction *QQuickListModelParser::ListModelData::in \inlineimage listmodel.png \enddiv - \snippet doc/src/snippets/qml/listmodel.qml 0 + \snippet doc/snippets/qml/listmodel.qml 0 Roles (properties) in each element must begin with a lower-case letter and should be common to all elements in a model. The ListElement documentation @@ -1389,14 +1389,14 @@ QQuickListModelParser::ListInstruction *QQuickListModelParser::ListModelData::in 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/qml/listmodel-simple.qml 0 + \snippet doc/snippets/qml/listmodel-simple.qml 0 \dots 8 - \snippet doc/src/snippets/qml/listmodel-simple.qml 1 + \snippet doc/snippets/qml/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/qml/listmodel-nested.qml model + \snippet doc/snippets/qml/listmodel-nested.qml model The delegate displays all the fruit attributes: @@ -1404,14 +1404,14 @@ QQuickListModelParser::ListInstruction *QQuickListModelParser::ListModelData::in \inlineimage listmodel-nested.png \enddiv - \snippet doc/src/snippets/qml/listmodel-nested.qml delegate + \snippet doc/snippets/qml/listmodel-nested.qml delegate \section1 Modifying List Models 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/qml/listmodel-modify.qml delegate + \snippet doc/snippets/qml/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 @@ -2456,12 +2456,12 @@ bool QQuickListModelParser::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/qml/qml-data-models/listelements.qml model + \snippet doc/snippets/qml/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/qml/qml-data-models/listelements.qml view + \snippet doc/snippets/qml/qml-data-models/listelements.qml view \sa ListModel */ |