[PyQt] SIGNAL from checkbox embedded in the QTreeWidgetItem?

Piotr Byzia piotr.byzia at gmail.com
Thu Nov 5 10:15:53 GMT 2009


On 05.11.2009, at 08:32, simozack wrote:

> 2009/11/4 Piotr Byzia <piotr.byzia at gmail.com>:
>> Hi,
>> There is this email:
>> http://www.riverbankcomputing.com/pipermail/pyqt/2009-October/024801.html
>> Unfortunately, author did not post a follow-up post on how he got  
>> it done.
>> I want to grab a signal from a checkbox added to the  
>> QTreeWidgetItem by the
>> method: setCheckState(0, Qt.Checked)
>> Could anyone help?
>
> You can connect to the signal itemChanged(item, col) of the
> QTreeWidget and check if the column 0 has checked or not.

Thanks, I should have checked this myself before asking..

However, there is one more thing I'd like to ask.
Is there a way to distinguish between actions were there actually was  
a change in checkbox state?
The same as in combo boxes and its signals: activated (int) and  
currentIndexChanged (int) ?
Or do I have to take care of this on my own?

Best wishes,
Piotr Byzia


More information about the PyQt mailing list