cgahete
29th August 2013, 16:49
Hello,
I've been searching the forum but didn't find any clue about the following doubt:
I have a QTreeWidgetItem that I have made it editable:
pItem->setFlags(pItem->flags() | Qt::ItemIsEditable);
If I use:
connect(tree->treeWidget, SIGNAL(itemChanged( QTreeWidgetItem *, int)), (Tree*)tree, SLOT(foo()))
it detects not only when it has been edited, but also if its icon has changed.
1) Is there an easy way to detect only when its text has been changed?
2) The connect code that I use detects changes in any item of the tree. How can I make it to trigger only for a certain Item of the tree?
Thank you in advance,
I've been searching the forum but didn't find any clue about the following doubt:
I have a QTreeWidgetItem that I have made it editable:
pItem->setFlags(pItem->flags() | Qt::ItemIsEditable);
If I use:
connect(tree->treeWidget, SIGNAL(itemChanged( QTreeWidgetItem *, int)), (Tree*)tree, SLOT(foo()))
it detects not only when it has been edited, but also if its icon has changed.
1) Is there an easy way to detect only when its text has been changed?
2) The connect code that I use detects changes in any item of the tree. How can I make it to trigger only for a certain Item of the tree?
Thank you in advance,