I have subclassed QTreeWidget and want to enable drag and drop for it.
Every thing works except one thing. When I drag elements from the tree widget, it copies the element. I would like to copy element when dragging from outside the tree widget and move element when dragging from the tree widget. I know there is a setSupportedDragActions in QAbstractItemModel but I can't use it since model() function returns a const.
There must be a way to do this and not subclass a model right ?
One more question, when starting a drag with Qt::CopyAction and Qt::MoveAction and dropping on a widget that accept only Qt::MoveAction, will dropMimeData be called for each drop actions specified in the startDrag ? If so, how could I know where the drag comes from ?
Bookmarks