how to sync a QTreeWidget and a QListWidget?
hi, there
I have a qtreewidget and a qlistwidget in a form. The qtreewidget accepts drop operation. Once a item dropped on a node, I need to record the item's info and the node info on the qlistwidget. The qtreewidgetitem won't be changed on drop operation (let's just count the times of each node being dropped).
What I need to know is: how can the qlistwidget know if something is dropped in the qtreewidget? I know how to implement the drop operation in the qtreewidget but don't know how to pass that info to qlistwidget.
I basically follow the tutorial here http://sector.ynet.sk/qt4-tutorial/dnd.html.
The qtreewidget promote to myqtreewidget class where the drop operation is implemented.
Thanks for your comments.
zl2k
Re: how to sync a QTreeWidget and a QListWidget?
Quote:
Originally Posted by
zl2k
I know how to implement the drop operation in the qtreewidget but don't know how to pass that info to qlistwidget.
You can make tree widget emit a signal and connect it to a slot in list widget. Of course that means you have to subclass both widgets.
Re: how to sync a QTreeWidget and a QListWidget?