diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-04-27 16:35:12 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-30 04:33:55 +0200 |
commit | b0497cf5405e7ca95fa7a3eb51ff9c7f897c0e9e (patch) | |
tree | f2944d57e4780a5a56ac11735098c268018916ae /examples/quick/draganddrop/tiles/DragTile.qml | |
parent | 15692017d5b94302305bf15cfd1dd34dcc8a3a9e (diff) |
Elaborate on drag and drop and model view examples with snippets.
Change-Id: I8a6874c4bb480ed9bcc59e743b97d439f053840e
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'examples/quick/draganddrop/tiles/DragTile.qml')
-rw-r--r-- | examples/quick/draganddrop/tiles/DragTile.qml | 7 |
1 files changed, 5 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] |