QtQuick Examples - Drag and Drop

This is a collection of QML drag and drop examples

This is a collection of small QML examples relating to drag and drop functionality.

Tiles adds drag and drop to simple rectangles, which you can drag into a specific grid.

It has a DragTile component which uses a MouseArea to move an item when dragged:


And a DropTile component which the dragged tiles can be dropped onto:


The keys property of the DropArea will only allow an item with matching key in it's Drag.keys property to be dropped on it.

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 is dragged over.


Files: