You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

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,