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:

Qt Code:
  1. pItem->setFlags(pItem->flags() | Qt::ItemIsEditable);
To copy to clipboard, switch view to plain text mode 

If I use:

Qt Code:
  1. connect(tree->treeWidget, SIGNAL(itemChanged( QTreeWidgetItem *, int)), (Tree*)tree, SLOT(foo()))
To copy to clipboard, switch view to plain text mode 

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,