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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top