Question

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.

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top