I'm using python 3.2 and pyqt 4.8.5 on windows 7 32bit I'm trying to understand how subclassing QSqlTableModel works and i don't understand why this code fail:
class StaffModel(QSqlTableModel): def __init__(self, parent): QSqlTableModel.__init__(self, parent) self.setTable("staff") def flags(self, index): QSqlTableModel.flags(self, index) I use this model in a tableview and what i get is this messages: TypeError: invalid result type from StaffModel.flags() TypeError: invalid result type from StaffModel.flags() TypeError: invalid result type from StaffModel.flags() TypeError: invalid result type from StaffModel.flags() (...) If i delete the flags() method, so that StaffModel is the same of QSqlTableModel but with 'preloaded' the table name, everything works as expected. Looks Like i can not redefine methods ? Thanks. Paolo _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt