aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/tutorials/dynamicview
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@rim.com>2013-01-23 14:08:58 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-12 23:25:48 +0100
commit700910d938c75c978f765ec8438f81e70676999a (patch)
tree37a8397a13e3217db8140acf85644c8df452aca9 /examples/quick/tutorials/dynamicview
parentfa8a4beb157f82e02cf8471ade7da0faee7a9fa1 (diff)
Add QtQml.Models module
The moved Model classes can now be exposed in a QtQml import. To keep the QtQml import resticted to more core functionality, they are being exposed in a plugin module. Change-Id: I0a84642a72c7c9bbf9b6ffd2a6c33549f8e61c29 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'examples/quick/tutorials/dynamicview')
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml7
-rw-r--r--examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml7
2 files changed, 8 insertions, 6 deletions
diff --git a/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml b/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml
index 09c69df54d..7f353f075a 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview3/dynamicview.qml
@@ -39,6 +39,7 @@
****************************************************************************/
import QtQuick 2.0
+import QtQml.Models 2.1
//![0]
Rectangle {
id: root
@@ -111,8 +112,8 @@ Rectangle {
onEntered: {
visualModel.items.move(
- drag.source.VisualDataModel.itemsIndex,
- dragArea.VisualDataModel.itemsIndex)
+ drag.source.DelegateModel.itemsIndex,
+ dragArea.DelegateModel.itemsIndex)
}
}
//![3]
@@ -120,7 +121,7 @@ Rectangle {
}
//![2]
//![4]
- VisualDataModel {
+ DelegateModel {
id: visualModel
model: PetsModel {}
diff --git a/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml b/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml
index 6ff3f7eb96..82639c2016 100644
--- a/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml
+++ b/examples/quick/tutorials/dynamicview/dynamicview4/dynamicview.qml
@@ -39,6 +39,7 @@
****************************************************************************/
import QtQuick 2.0
+import QtQml.Models 2.1
Rectangle {
id: root
@@ -112,14 +113,14 @@ Rectangle {
onEntered: {
visualModel.items.move(
- drag.source.VisualDataModel.itemsIndex,
- dragArea.VisualDataModel.itemsIndex)
+ drag.source.DelegateModel.itemsIndex,
+ dragArea.DelegateModel.itemsIndex)
}
}
}
}
//![0]
- VisualDataModel {
+ DelegateModel {
id: visualModel
//![4]
property var lessThan: [