PDA

View Full Version : prevent drop in QTreeWidget



GrahamLabdon
27th May 2011, 10:00
Hi
Can someone advise me how to prevent a drop being accepted in certain circumstances in a QTreeWidget?
I have derived a class from QTreeWidget and have reimplemented the DropEvent method.
How do I get the information that tells me where the item is being dropped so I can tell whether or not the drop should be allowed?

Thanks

Graham

wysota
27th May 2011, 21:24
The tree gets a dragEnter and then (if accepted) a dragMove event. This is where you can decide if a drop would be accepted or not.