Pregunta

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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top