PDA

View Full Version : Catch item changed



nina1983
18th July 2008, 13:14
Dears,

I would like to know if there is a way to detect which item are changed in the QTreeWIdget.
I have for example in a "MyQWidget" class:


QTreeWidget* tree = new QTreeWidget(this);
/* ... all QTreeWidgetItem inserted..... */
connect(tree, SIGNAL( itemChanged ( QTreeWidgetItem * , int ), this, SLOT(...)));

There is a way to obtain a list of the QTreeWidgetItem that are changed?

Thank a lot ;)

Annalisa

munna
18th July 2008, 13:23
connect(tree, SIGNAL( itemChanged ( QTreeWidgetItem * , int ), this, SLOT(QTreeWidgetItem * , int)));

This should be enough because a user can anyways change only one item at a time. Every time an item is changed, this signal is emitted and therefore if you want a list of items that are changed, you can create one and maintain it.

nina1983
18th July 2008, 14:40
Thank a lot!

Now everything works as I want!

:D