aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/draganddrop
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/draganddrop
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/draganddrop')
-rw-r--r--examples/quick/draganddrop/doc/src/draganddrop.qdoc2
-rw-r--r--examples/quick/draganddrop/views/gridview.qml5
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/quick/draganddrop/doc/src/draganddrop.qdoc b/examples/quick/draganddrop/doc/src/draganddrop.qdoc
index 1844c3b4eb..ad32cbcfcd 100644
--- a/examples/quick/draganddrop/doc/src/draganddrop.qdoc
+++ b/examples/quick/draganddrop/doc/src/draganddrop.qdoc
@@ -49,7 +49,7 @@
\section2 GridView adds drag and drop to a GridView, allowing you to reorder the list.
- It uses a VisualDataModel to move a delegate item to the position of another item
+ It uses a DelegateModel to move a delegate item to the position of another item
it is dragged over.
\snippet quick/draganddrop/views/gridview.qml 0
diff --git a/examples/quick/draganddrop/views/gridview.qml b/examples/quick/draganddrop/views/gridview.qml
index 4df265e8af..f2c9c75e42 100644
--- a/examples/quick/draganddrop/views/gridview.qml
+++ b/examples/quick/draganddrop/views/gridview.qml
@@ -39,6 +39,7 @@
****************************************************************************/
import QtQuick 2.0
+import QtQml.Models 2.1
GridView {
id: root
@@ -50,7 +51,7 @@ GridView {
}
//! [0]
- model: VisualDataModel {
+ model: DelegateModel {
//! [0]
id: visualModel
model: ListModel {
@@ -84,7 +85,7 @@ GridView {
delegate: MouseArea {
id: delegateRoot
- property int visualIndex: VisualDataModel.itemsIndex
+ property int visualIndex: DelegateModel.itemsIndex
width: 80; height: 80
drag.target: icon