diff options
Diffstat (limited to 'examples/quick/draganddrop/tiles')
-rw-r--r-- | examples/quick/draganddrop/tiles/DragTile.qml | 7 | ||||
-rw-r--r-- | examples/quick/draganddrop/tiles/DropTile.qml | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/examples/quick/draganddrop/tiles/DragTile.qml b/examples/quick/draganddrop/tiles/DragTile.qml index 1f4a8c2bea..f5e008a171 100644 --- a/examples/quick/draganddrop/tiles/DragTile.qml +++ b/examples/quick/draganddrop/tiles/DragTile.qml @@ -40,6 +40,7 @@ import QtQuick 2.0 +//! [0] Item { id: root property string colorKey @@ -69,7 +70,7 @@ Item { Drag.active: mouseArea.drag.active Drag.hotSpot.x: 32 Drag.hotSpot.y: 32 - +//! [0] Text { anchors.fill: parent color: "white" @@ -78,13 +79,15 @@ Item { horizontalAlignment:Text.AlignHCenter verticalAlignment: Text.AlignVCenter } - +//! [1] states: State { when: mouseArea.drag.active ParentChange { target: tile; parent: root } AnchorChanges { target: tile; anchors.verticalCenter: undefined; anchors.horizontalCenter: undefined } } + } } } +//! [1] diff --git a/examples/quick/draganddrop/tiles/DropTile.qml b/examples/quick/draganddrop/tiles/DropTile.qml index 98fedeb775..025f6df617 100644 --- a/examples/quick/draganddrop/tiles/DropTile.qml +++ b/examples/quick/draganddrop/tiles/DropTile.qml @@ -40,6 +40,7 @@ import QtQuick 2.0 +//! [0] DropArea { id: dragTarget @@ -66,3 +67,4 @@ DropArea { ] } } +//! [0] |