In addition to setAcceptDrops( true ), you should process QEvent:: DragEnter and QEvent:: Drop events at least.
There are examples on this purpose in Qt (examples/draganddrop, http://doc.qt.nokia.com/latest/examp...aganddrop.html).
In addition to setAcceptDrops( true ), you should process QEvent:: DragEnter and QEvent:: Drop events at least.
There are examples on this purpose in Qt (examples/draganddrop, http://doc.qt.nokia.com/latest/examp...aganddrop.html).
I have already tried to make setAcceptDrops true and describe DragEnteredEvent function.
But when dragging a file on QTreeView, mouse pointer shows me unavailable icon as below not plus icon.
1.png
and I found enter into DragEnteredEvent when a files is dragged on QTreeView but DropEvent doesn't occur.
Last edited by guri; 28th September 2011 at 01:44.
Are you sure you accept QEvent::DragEnter (event->accept()) event and consume it for tree view?
Could you paste a piece of code here?
I have some missing codes.
I solved it. event->accept() should be inserted in DragEnter, DragMove event.
Thank you
Bookmarks