[PyQt] Database Connection still does not work...

David Boddie david at boddie.org.uk
Mon May 7 19:35:40 BST 2007


On Sun May 6 18:44:34 BST 2007, daloonia wrote:

> when I then run Python from shell and just want to test if it's possible to
> creat a connection, the same errormessage occured...:
> > >from PyQt4.QtSql import *
> > QSqlDatabase.addDatabase("QPSQL")
> >
> > in Python Interpreter, then the error-message "QSqlDatabase: driver not 
> > loaded
> > QSqlDatabase:
> > available drivers
> >  PyQt4.QtSql.QSqlDatabase object at 0x008E58A0"
> 
> So, I really don't know what goes wrong with this...

Can you create a QApplication instance before adding the database and see if
this works?

David


More information about the PyQt mailing list