diff options
author | Ivan Solovev <[email protected]> | 2021-03-05 16:03:14 +0100 |
---|---|---|
committer | Ivan Solovev <[email protected]> | 2021-03-16 23:07:57 +0100 |
commit | 698bbb74f06f9566b3812e9123838fdc7b57c388 (patch) | |
tree | f1d97d01656d8c55ebef75db8b2907651fcdda47 | |
parent | 447831e6e0fcc37e8617430827702b59856d5edb (diff) |
Reintroduce XmlListModel to qml models description page
Now when the XmlListModel is again a part of Qt, we can reintroduce the
section describing it to the models documentation page.
Task-number: QTBUG-89817
Change-Id: I8937fa30da26209fe3672dad86d094b139dab6c5
Reviewed-by: Ulf Hermann <[email protected]>
-rw-r--r-- | src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc index 607479a03d..8b91e6d432 100644 --- a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc +++ b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc @@ -236,26 +236,25 @@ To visualize data, bind the view's \c model property to a model and the Even if subsequent roles are added, only the first two will be handled by views using the model. To reset the roles available in the model, call ListModel::clear(). -\omit //! XmlListModel \section2 XML Model XmlListModel allows construction of a model from an XML data source. The roles - are specified via the \l [QML]{XmlRole} type. The type needs to be imported. + are specified via the \l [QML]{XmlListModelRole} type. The type needs to be imported. \code - import QtQuick.XmlListModel 2.0 + import QtQml.XmlListModel \endcode - The following model has three roles, \e title, \e link and \e description: + The following model has three roles, \e title, \e link and \e pubDate: \qml XmlListModel { id: feedModel source: "http://rss.news.yahoo.com/rss/oceania" query: "/rss/channel/item" - XmlRole { name: "title"; query: "title/string()" } - XmlRole { name: "link"; query: "link/string()" } - XmlRole { name: "description"; query: "description/string()" } + XmlListModelRole { name: "title"; elementName: "title" } + XmlListModelRole { name: "link"; elementName: "link" } + XmlListModelRole { name: "pubDate"; elementName: "pubDate" } } \endqml @@ -264,7 +263,6 @@ To visualize data, bind the view's \c model property to a model and the The \l{Qt Quick Demo - RSS News}{RSS News demo} shows how XmlListModel can be used to display an RSS feed. -\endomit \section2 Object Model |