From b0497cf5405e7ca95fa7a3eb51ff9c7f897c0e9e Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Fri, 27 Apr 2012 16:35:12 +1000 Subject: Elaborate on drag and drop and model view examples with snippets. Change-Id: I8a6874c4bb480ed9bcc59e743b97d439f053840e Reviewed-by: Alan Alpert --- examples/quick/draganddrop/views/gridview.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'examples/quick/draganddrop/views/gridview.qml') diff --git a/examples/quick/draganddrop/views/gridview.qml b/examples/quick/draganddrop/views/gridview.qml index b18078f48d..d156ca0c48 100644 --- a/examples/quick/draganddrop/views/gridview.qml +++ b/examples/quick/draganddrop/views/gridview.qml @@ -49,7 +49,9 @@ GridView { NumberAnimation { properties: "x,y"; easing.type: Easing.OutQuad } } +//! [0] model: VisualDataModel { +//! [0] id: visualModel model: ListModel { id: colorModel @@ -78,7 +80,7 @@ GridView { ListElement { color: "crimson" } ListElement { color: "teal" } } - +//! [1] delegate: MouseArea { id: delegateRoot @@ -125,5 +127,6 @@ GridView { onEntered: visualModel.items.move(drag.source.visualIndex, delegateRoot.visualIndex) } } +//! [1] } } -- cgit v1.2.3