summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp2
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp17
2 files changed, 13 insertions, 6 deletions
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 51e6f99..5590449 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -1039,7 +1039,7 @@ public:
/*!
\qmlproperty Item AnchorChanges::target
- This property holds the Item whose anchors will change
+ This property holds the \l Item for which the anchor changes will be applied.
*/
QDeclarativeAnchorChanges::QDeclarativeAnchorChanges(QObject *parent)
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 00169db..9895ff2 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -508,8 +508,8 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
\since 4.7
\brief The XmlListModel element is used to specify a model using XPath expressions.
- XmlListModel is used to create a model from XML data. XmlListModel can be used as a data source
- for the view classes (such as ListView, PathView, GridView) and other classes that interact with model
+ XmlListModel is used to create a model from XML data. It can be used as a data source
+ for view elements (such as ListView, PathView, GridView) and other elements that interact with model
data (such as \l Repeater).
For example, if there is a XML document at http://www.mysite.com/feed.xml like this:
@@ -520,11 +520,11 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
...
<channel>
<item>
- <title>Item A</title>
+ <title>A blog post</title>
<pubDate>Sat, 07 Sep 2010 10:00:01 GMT</pubDate>
</item>
<item>
- <title>Item B</title>
+ <title>Another blog post</title>
<pubDate>Sat, 07 Sep 2010 15:35:01 GMT</pubDate>
</item>
</channel>
@@ -560,10 +560,17 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
ListView {
width: 180; height: 300
model: xmlModel
- delegate: Text { title + " (" + pubDate + ")" }
+ delegate: Text { text: title + " (" + pubDate + ")" }
}
\endqml
+ \image qml-xmllistmodel-example.png
+
+ The XmlListModel data is loaded asynchronously, and \l status
+ is set to \l XmlListModel::Ready when loading is complete.
+ Note this means when XmlListModel is used for a view, the view is not
+ populated until the model is loaded.
+
\section2 Using key XML roles