[PyQt] QTreeView DragDropMode (Copy vs. Move)
Bart Kroon
pyqt at tarmack.eu
Tue Apr 24 23:36:48 BST 2012
When time is short I would say, add a method to the source model that you can
call from the target model that removes the received items. That would make it
work at least. It might even be the best way to do such a thing, but I'm not
sure.
It seems you handle the dragged in mimedata as the object coming from the
source model. That doesn't seem right to me, you should serialise the
information in the source models mimeData() method. This can be done in any
way you like, so you could include sufficient information to describe the
original node and remove it from the source model.
-- Bart
More information about the PyQt
mailing list