Conclusion

Having done all this work, it is probably discouraging to note that drag and drop has already been completely integrated into the QMultiLineEdit class. This means that our work was quite superfluous, though hopefully instructive.

I have only touched upon the fringes of this subject. If you want to create your own datatypes in order to drag and drop complex objects (for instance animation cells, or three-dimensional CAD drawings, or perhaps complete Python object hierarchies), then you must implement new Mime types. This goes way beyond the scope of this book; I suggest you first read the Qt online documentation on the subject, and then start experimenting.