summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativexmllistmodel.cpp
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@nokia.com>2011-02-04 11:28:14 (GMT)
committerJerome Pasion <jerome.pasion@nokia.com>2011-02-04 11:28:14 (GMT)
commitce0fc2ebeaf195368c31b143a40850f01ada450a (patch)
tree3c46a405766b4ec5a5676fca15df5d4e13ca2342 /src/declarative/util/qdeclarativexmllistmodel.cpp
parent39e7c4de155a150a0e7da6e40f59aadecaea0a8a (diff)
parent74ad5ce57adedc91717ffd67e3e65b8f76d12052 (diff)
downloadQt-ce0fc2ebeaf195368c31b143a40850f01ada450a.zip
Qt-ce0fc2ebeaf195368c31b143a40850f01ada450a.tar.gz
Qt-ce0fc2ebeaf195368c31b143a40850f01ada450a.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Conflicts: doc/src/declarative/extending.qdoc doc/src/external-resources.qdoc src/declarative/util/qdeclarativeanimation.cpp src/declarative/util/qdeclarativetransition.cpp
Diffstat (limited to 'src/declarative/util/qdeclarativexmllistmodel.cpp')
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 7da4ecd..6b13e88 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -90,10 +90,15 @@ typedef QPair<int, int> QDeclarativeXmlListRange;
\qml
XmlListModel {
id: xmlModel
- ...
- XmlRole { name: "title"; query: "title/string()" }
+ // ...
+ XmlRole {
+ name: "title"
+ query: "title/string()"
+ }
}
+ \endqml
+ \qml
ListView {
model: xmlModel
delegate: Text { text: title }
@@ -792,9 +797,9 @@ void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarati
This will access the \c title value for the first item in the model:
- \qml
- var title = model.get(0).title;
- \endqml
+ \js
+ var title = model.get(0).title;
+ \endjs
*/
QScriptValue QDeclarativeXmlListModel::get(int index) const
{