[PyQt] Bugs galore in QAbstractTableModel???
Wolfgang Rohdewald
wolfgang at rohdewald.de
Sat Nov 27 22:42:17 GMT 2010
On Samstag 27 November 2010, Ian wrote:
> So here are the model and view:
you could try to add checks to your methods like
in data():
if index.isValid():
if role == Qt.DisplayRole:
data() will also be called with role == Qt.CheckStateRole
in which case your code returns True
or in headerData:
if role == Qt.DisplayRole and orientation == Qt.Horizontal:
return ...whatever...
else:
return QVariant()
--
Wolfgang
More information about the PyQt
mailing list