aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2011-11-16 17:58:19 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-01 02:40:06 +0100
commit44d8691745ee9e8f927bdcd493f26b759c77d71c (patch)
tree03c45294a3ae6d199bd25aec25158f37a03d2fd9 /doc
parent5b949572aa56c5bce087fb0c023af7c96c40f139 (diff)
Move XmlListModel to seperate plugin
XmlListModel is the only feature inside QtDeclarative which depends on the QtXmlPatterns module, move this item to a separate plugin can reduce the unnecessary dependency in most use cases. To use the new XmlListModel, an additional "import QtQuick.xmllistmodel 2.0" is needed. Task-number:QTBUG-22158 Change-Id: I9e19eb6cbba46cd40fb7ffcdbd741f346779a54d Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc4
-rw-r--r--doc/src/snippets/declarative/xmlrole.qml1
2 files changed, 5 insertions, 0 deletions
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index 61604d271d..4fe7193530 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -114,8 +114,12 @@ using the model. To reset the roles available in the model, call ListModel::clea
XmlListModel allows construction of a model from an XML data source. The roles
are specified via the \l XmlRole element.
+Note: From QtQuick 2.0, XmlListModel has been move to a seperate module \l QtQuick.XmlListModel,
+to use XmlListModel item, an additional "import QtQuick.XmlListModel 2.0" is needed.
+
The following model has three roles, \i title, \i link and \i description:
\qml
+import QtQuick.XmlListModel 2.0
XmlListModel {
id: feedModel
source: "http://rss.news.yahoo.com/rss/oceania"
diff --git a/doc/src/snippets/declarative/xmlrole.qml b/doc/src/snippets/declarative/xmlrole.qml
index 6709d319ac..4d6964a89a 100644
--- a/doc/src/snippets/declarative/xmlrole.qml
+++ b/doc/src/snippets/declarative/xmlrole.qml
@@ -39,6 +39,7 @@
****************************************************************************/
import QtQuick 2.0
+import QtQuick.XmlListModel 2.0
Rectangle {
width: 300; height: 200