Where are the signals itemChecked and itemUncheсked on the QTreeWidget?
Qt Signals: (quote from PyQt4 QTreeWidget documentation page)
void currentItemChange
To complete the answer of @ekhumoro, and to give a shorter answer (without subclassing QTreeWidgetItem): block the signal :
self.treeWidget.blockSignals(True)
self.treeWidget.blockSignals(False)
and use
self.treeWidget.itemChanged
to connect to what you want. the signal is used when the data is changed (text inside, checked state, ...) and in your function linked to this signal verify if the treeWidget has changed is checked state.