|
|
2010-04-05
, 19:31
|
|
|
Posts: 754 |
Thanked: 630 times |
Joined on Sep 2009
@ London
|
#2
|
|
|
2010-04-05
, 20:11
|
|
Posts: 49 |
Thanked: 41 times |
Joined on Apr 2010
|
#3
|
I'm trying to use checkable items in the listwidget. I can see the state changing allright in the code, but the graphics is not updated at all. What can I do to fix that? Anything missing in this code?
After putting all the items in the list, I set:
QObject.connect(self.listField, QtCore.SIGNAL('itemActivated(QListWidgetItem*)'), self.doItemChangeState)then in doItemChangeState:
def doItemChangeState(self, item): """ invert the state of the activated item """ if item.checkState() == QtCore.Qt.Checked: item.setCheckState(QtCore.Qt.Unchecked) else: item.setCheckState(QtCore.Qt.Checked)Last edited by viraptor; 2010-04-05 at 19:27.