Use view transitions in drag'n'drop example
authorBea Lam <bea.lam@nokia.com>
Tue, 28 Feb 2012 02:00:26 +0000 (12:00 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 2 Mar 2012 07:26:52 +0000 (08:26 +0100)
Change-Id: Idc661225acf9e517d26928cafba650ac48ca880a
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
examples/qtquick/draganddrop/views/gridview.qml

index 04d8dee..b18078f 100644 (file)
@@ -45,6 +45,10 @@ GridView {
     width: 320; height: 480
     cellWidth: 80; cellHeight: 80
 
+    displaced: Transition {
+        NumberAnimation { properties: "x,y"; easing.type: Easing.OutQuad }
+    }
+
     model: VisualDataModel {
         id: visualModel
         model: ListModel {
@@ -93,7 +97,7 @@ GridView {
                 color: model.color
                 radius: 3
 
-                Drag.active: delegateRoot.pressed
+                Drag.active: delegateRoot.drag.active
                 Drag.source: delegateRoot
                 Drag.hotSpot.x: 36
                 Drag.hotSpot.y: 36