[Qt-creator] Drag&Drop in Qt Creator

Jochen Becher jochen_becher at gmx.de
Mon Mar 3 17:22:04 CET 2014


currently I am developing a new Qt Creator plug-in for some kind of
structural modeling (very tiny sub-set of UML). I would like to
integrate the plug-in smoothly: it should be possible to drag project
explorer nodes or class-view nodes to a diagram or the model tree to
create new model elements (packages, components and classes).

Currently all the trees and lists do not support drag&drop. As a test I
enhanced ProjectExplorer::FlatModel and ProjectExplorer::ProjectTreeView
to support drag&drop and it works fine.

Now I wonder if there is any interest to implement a generic concept of
drag&drop in Qt Creator? That means one should define an API where
plug-ins may ask for drag&drop support (no need to make items draggable
if there are no consumers enabled) and define a list of mime-types and
QMimeData contents that are dragged from the different trees and lists.

Otherwise I will keep my changes private.

Regards, Jochen

More information about the Qt-creator mailing list