[Qt-interest] How to correctly implement drag and drop?
Sylvain Pointeau
sylvain.pointeau at gmail.com
Tue Dec 2 15:46:48 CET 2008
Hi,
You can change the property to "InternalMove" then the move is the default
action,
BUT I found a bug in Qt 4.4.2 with "internalMove", it delivers only
"MoveAction" inside the function "dropMimeData" ... so it is unusable ! I
came back to the default option (which copy the item by default and doesn't
use the right key (to select the copy or the move) on Macosx :-((( )
bug for the internalMove
http://www.trolltech.com/developer/task-tracker/index_html?id=232272&method=entry
bug for the wrong key, that have been rejected :-(
http://www.trolltech.com/developer/task-tracker/index_html?id=232792&method=entry
Now I am just curious to see the progress of the items-ng project lab.
Cheers,
Sylvain
On Tue, Dec 2, 2008 at 10:48 AM, Jason Wood <jason at rtsw.co.uk> wrote:
> Hi,
>
> I have a QTreeView, which is accessing my model (which is derived from
> QAbstractItemModel)
>
> The behaviour that i am trying to get is as follows :
>
> When a drop event occurs that did not start within the tree view, I want it
> to
> be a copy action event.
>
> When a drop event starts within the tree view, I want it to be a move
> action
> event.
>
> I have set my model to support both move and copy actions, but whenever I
> start a drag inside of the tree view, it always defaults to being a copy
> action.
>
> Is there a way to set this to be a move action, prefereably without needing
> to
> subclass the view?
>
> Cheers,
> Jason
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081202/43dabf5d/attachment.html
More information about the Qt-interest-old
mailing list