Hello Lemming,
I was facing the same problem a few days ago and to be short I don't find a way to solve this on the model side.
The model provides a method to tell which drop actions are supported:
Qt::DropActions QAbstractItemModel::supportedDropActions () const
To copy to clipboard, switch view to plain text mode
This method must be overwritten and return Qt::MoveAction, so the model won't accept any "CopyDrops".
On the drag-site there is the method
void QAbstractItemModel::setSupportedDragActions ( Qt::DropActions actions )
To copy to clipboard, switch view to plain text mode
which can be used to set the supported actions. These actions are queried by the view when a drop is started using QAbstractItemModel::supportedDragActions(), but somehow this doesn't work as expected, the standard list or tree view always creates a "CopyDrop", and I didn't find a way to prevent this.
The only thing you can do is to subclass the view you are using and overwrite the startDrag method, and force it to make a Qt::MoveAction when the drag event starts.
The above mentioned methods were introduced in qt-4.2 and I was trying with 4.2.1.
Hope it helps.
Bookmarks