Hello guys, I´m new here and I am working with QT4.

I want to use the persistent editor of the QTreeWidget in order to edit the contents of it.

So, I connect the double click signal with a slot that calls the QTreeWidget:penPersistentEditor.

The problem is that I need to catch when the user finishes editing the item or when it loses focus.

I connected the itemChanged signal with a slot that calls the QTreeWidget::closePersistentEditor.

It works fine when the user actually edit the item and presses the "Enter" button on the keyboard. But when the user presses the keyboard "Enter" without changing the item content, the signal itemChanged is not emitted and I can´t close the editor!

Another way I found to use this editor was creating another slot connected with the double clicked signal that instead of calling the openPersistenEditor method, it does like this:

item->setFlags(item->flags() | Qt::ItemIsEditable);
treewidget->editItem(item, 0);
item->setFlags(item->flags() & ~Qt::ItemIsEditable);


It works fine, the editor closes when it loses focus or when the user presses "Enter".

But, I really need to catch when this editor is closed to do some checking in the contents of the item modified.

Is there any signal that is called when this editor is closed?



I thank any help!!!!