summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-21 06:12:31 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-21 06:12:31 (GMT)
commit6a61351ae264efb4df17794f97642f63dd0c3690 (patch)
tree75842665831872f15102eea191b04489b7074729 /doc
parent6abe7f1ef6021a1174d88d1a2811c58241a96707 (diff)
downloadQt-6a61351ae264efb4df17794f97642f63dd0c3690.zip
Qt-6a61351ae264efb4df17794f97642f63dd0c3690.tar.gz
Qt-6a61351ae264efb4df17794f97642f63dd0c3690.tar.bz2
Add hasModelChildren property to delegates with QAbstractItemModel model type.
Also add some helper function to VisualDataModel: - VisualDataModel::modelIndex(int) returns a QModelIndex which can be assigned to VisualDataModel::rootIndex - VisualDataModel::parentModelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index d8b2a5d..eecc117 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -206,8 +206,16 @@ The default role names set by Qt are:
\endtable
QAbstractItemModel presents a heirachy of tables. Views currently provided by QML
-can only display list data. In order to display child lists of a heirachical model
-use the VisualDataModel element with \e rootIndex set to a parent node.
+can only display list data.
+In order to display child lists of a heirachical model
+the VisualDataModel element provides several properties and functions for use
+with models of type QAbstractItemModel:
+\list
+\o \e hasModelChildren role property to determine whether a node has child nodes.
+\o \l VisualDataModel::rootIndex allows the root node to be specifed
+\o \l VisualDataModel::modelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
+\o \l VisualDataModel::parentModelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
+\endlist
\section2 QStringList