Reputation: 1715
I have subclassed QMimeData and drag&drop works perfectly fine within my widget – for both copyAction and MoveAction, Data gets copied and moved as needed (based on shift / ctrl keys etc.)
For compatibility I am supporting other simple formats such as text/plain – the major problem is, I cannot allow ‘move’ operation for the drops to other applications for these compatible formats.
For example, I allow my data to be dropped from my widget to some textbox – but only as long as it is a ‘copyAction’. But, I do not see any way of forcing this.
Question: How to force the drop action to be ‘copy action’ for all external widgets, while allowing the copy/move within my widget?????
By 'force' it is meant no matter what user chooses (ctrl, shift or whatever) - my data should always get 'copied' and not 'moved' when the drag happens for compatible formats. (while it should allow copy and move for its native format)
How to enforce this in Qt?
Upvotes: 4
Views: 1684