QML Drag and Drop example

This is a small working example of how to add drag and drop functionality to QML


Open in QtCreator and launch the program. You will see a window with two squares.
Drag the red square over the blue square and watch the debug messages in the console.

General architecture

The basic idea is to create two QML components, DragArea and DropArea, that act as thin wrappers
between QML and the built-in drag and drop functionnality from QGraphicsItem.

For more information, see:


This example is release under the MIT license

For more information, please feel free to contact me at: