PDA

View Full Version : Removing items from qtreeview



Babak
5th February 2009, 17:36
Hi Everyone,

I was wondering if anyone know what the correct/best way to deselect items inside of a qtreeview is ? I'm using pyqt and am trying to do something like this but it doesn't seem to be doing anything

selectionModel = self.selectionModel()
selectionModel.select(itemToDeselect, QtGui.QItemSelectionModel.deselect)

after doing this the item is still selected in the gui but if I do
selectionModel.isSelected(itemToDeselect)

then it returns False.

Any ideas/suggestions would be greatly appreciated

thanks
babak

wysota
5th February 2009, 19:44
Could you check if selectionChanged () is emitted from the selection model after you do what you described?