[PyKDE] QDataTable problems

Phil Thompson phil at river-bank.demon.co.uk
Fri Nov 30 17:02:05 GMT 2001


erik wrote:
> 
> I am using PyQT3.0.0 and am having troubles with QDataTables.
> 
> It returns the right number of rows, but the data in char fields is
> blank and the data in the int fields is all 0?
> 
> I am using PGSQL7 driver with pgsql 7.1.1
> 
> def qqq():
> 
>  qapp = QApplication(sys.argv)
> 
> #named connection to my database happens here, returns correctly
>  if(dblinkup()!=1):
>   return 0
> 
>  db = QSqlDatabase.database("localpgsql")
>  curs = QSqlCursor("stuff",TRUE,db)
>  stuff_table = QDataTable(curs,TRUE)
>  qapp.setMainWidget(stuff_table)
>  stuff_table.refresh()
>  stuff_table.show()
> 
>  return qapp.exec_loop()

As it's a small example, can you see if the equivalent C++ program does
the same?

Phil




More information about the PyQt mailing list