[PyQt] QSqlQueryModel works but QSqlTableModel doesn't work

Simone simozack at yahoo.it
Tue Mar 4 14:59:33 GMT 2008


Ivan Coronado ha scritto:

>         self.tb= QtSql.QSqlTableModel()   
>         self.tb.setTable("condicionesref") #if I change the table works ok
>         self.tb.setEditStrategy(QtSql.QSqlTableModel.OnManualSubmit)
>         self.tb.select() #returns False
>         print self.tb.rowCount() #returns 0
>         self.ui.tvOpcionesReglas.setModel(self.tb)
>         self.ui.tvOpcionesReglas.show() #only show the column names

Stupid question: is there any records on the table?

Simone
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 



More information about the PyQt mailing list