[Qt-interest] QTreeWidget and checkable items

Lorenzo Berni duplo at develer.com
Fri Feb 20 12:41:24 CET 2009


Hi, guys,

I'm working on a QTreeWidget. The items of this QTreeWidget are  
checkable and I want to be notified when one of them is checked (or  
unchecked). In the documentation I can't find any signal for this  
purpose so I decide to implement one using the itemPressed signal and  
checking the state of the item passed by this. But when i click on an  
item's checkbox the item passed by the signal has the previous state  
instead of the current one, probably because the state is changed  
after the signal is emitted. In fact clicking on the item (not on the  
checkbox) the signal is emitted, and in this case the state is the  
right one.

Anyone has an idea to resolve this problem?

--
Lorenzo Berni
Develer S.r.l.
http://www.develer.com







More information about the Qt-interest-old mailing list