-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
4.8.2, 4.8.4
-
I am running on Windows 7 Professional, SP1, 64-bit.
MS Visual Studio 2008 Version 9.0.30729.1 SP (C++)
I derived a model from QStandardItemModel that I wanted to use with Drag and Drop and I am using it in a QTreeView. In my over-ridden dropMimeData method, I only want to allow the drops to take place if I have a valid parent object. (I.e. NOT allow drops on the top level of the tree).
I assumed returning false from this method would abort the drag and the drop, but that is not the case. If I return false, the DROP is not done, but the item being DRAGGED is still removed from the model.
I have attached a small test program that shows the issue. If you build it and then try to drag an item out of the treeView and drop it onto some empty space at the bottom of the treeView, the item will not be dropped anywhere, but WILL be removed from the model.