summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativevisualdatamodel/data
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 /tests/auto/declarative/qdeclarativevisualdatamodel/data
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 'tests/auto/declarative/qdeclarativevisualdatamodel/data')
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml
new file mode 100644
index 0000000..d70f82b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml
@@ -0,0 +1,11 @@
+import Qt 4.7
+
+VisualDataModel {
+ function setRoot() {
+ rootIndex = modelIndex(0);
+ }
+ function setRootToParent() {
+ rootIndex = parentModelIndex();
+ }
+ model: myModel
+}