Frage

I have a QTreeWidget with some items in it. However, due to my data structure, I need to have the QTreeWidget (or the QTreeWidgetItem) tell me when someone finishes editing it.

I already have a subclass of both QTreeWidget and QTreeWidgetItem, if that makes it any easier to solve.

War es hilfreich?

Lösung

the QTreeWidget emits the signal QTreeWidget::itemChanged ( QTreeWidgetItem * item, int column ). this should do the job.

the thing is, it will also be called when you fill or change the tree from your code. therefor use the QObject::blockSignals(bool) to solve that.

soo long zai

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top