Ja ja ja, yes, now the table has 15 records. Using QSqlQueryModel I can see the 
records. Another rare thing, If I use QSqlTableModel I only see the column 
names, but If I click in any header of the table, all the column names 
disappear.

Thanks for the reply Simone


-------------------------------------------------------------
Iván Coronado
IT Manager
[EMAIL PROTECTED]
943 82 00 10
Engine Power Components Group Europe
 

-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Simone
Enviado el: martes, 04 de marzo de 2008 16:00
Para: [email protected]
Asunto: Re: [PyQt] QSqlQueryModel works but QSqlTableModel doesn't work

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 

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to