[PyQt] QAbstractItemModel modelAboutToBeReset signal
Patrick Boucher
pboucher at patrickboucher.com
Wed Apr 8 16:55:39 BST 2009
Hi all,
I've subclassed QAbstractItemModel and overloaded reset to be:
def reset(self):
self.modelAboutToBeReset.emit()
self._loadPeople()
self.modelReset.emit()
and I get errors pertaining to missing attributes modelAboutToBeReset
and modelReset. Do I have something wrong with the new syntax for
emitting signals or is this a known thing or a bug? I'm using latest
snapshots of sip and pyqt.
The pre-4.5 version of the code works fine:
def reset(self):
self.emit(QtCore.SIGNAL('modelAboutToBeReset()'))
self._loadPeople()
self.emit(QtCore.SIGNAL('modelReset()'))
Many thanks,
Patrick
More information about the PyQt
mailing list