PDA

View Full Version : QListWidget/QTreeWidget Drag and Drop



hlvietlong
29th June 2009, 21:44
Hi guys,

I subclassed QListWidgetItem and QTreeWidgetItem so when those got copied/moved, all the custom data weren't copied/moved with it. Thus, I think I have to override drag drop methods in QListWidget and QTreeWidget but I have no idea how to do that? Any suggestions???

Thanks a lot!

wysota
29th June 2009, 22:15
I think it might be enough if you reimplemented the clone() method.

hlvietlong
30th June 2009, 18:09
oh another thing I wanna do is to move (not copy) the items. I tried changed supportedDropAction to Qt.MoveAction only but that doesn't allow me to move at all. Do you have any suggestions?