Hello, I'm trying to load one table in a QSqlTableModel. The columns loads with 
no problem, but the data doesn't load. When I use the select() method it 
returns False. The same table load Ok with QSqlQueryModel. I haven't problems 
with the others tables.

----------------------------------------------------------------
class dlgChild(QtGui.QWidget):
    def __init__(self,parent=None):
        QtGui.QMainWindow.__init__(self,parent)
        self.ui = Ui_Form()
        self.ui.setupUi(self)
        
        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
-----------------------------------------------------------------

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

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

Reply via email to