You are not logged in.

1

Tuesday, July 31st 2012, 4:05pm

[SOLVED] QTreeView - how to block dropping outside view

Hey,
I use drag&drop on QTreeView. How can i disable dropping items outside QTreeView?

Source code

1
treeView->setDragDropMode(QAbstractItemView::InternalMove);

Don't work :(. I use code from this example: http://www.java2s.com/Code/Cpp/Qt/QTreeViewdraganddrop.htm

EDIT: i just change mimetype and it works, thx, gr8 forum :)

This post has been edited 2 times, last edit by "raver" (Jul 31st 2012, 5:11pm)


2

Monday, August 12th 2013, 4:07am

Hi Raver,
Could you please tell us how you fixed that?
Thank you in advance,