On Thu, 18 Mar 2010 10:40:54 -0400, Brandon Orther <[email protected]> wrote: > Hello, > > I installed the Windows binary package PyQt-Py2.6-gpl-4.7.2-1.exe on > WindowsXP SP3 which is running PostgreSQL 8.3 > > The download page says "Qt (with database support for MySQL, PostgreSQL, > SQLite3 and ODBC)" which leads me to believe it will be able to connect to > my local PostgreSQL database out of the box. > > I wrote a simple test script which works on my OS X machine: > > from PyQt4.QtCore import * > from PyQt4.QtSql import * > > db = QSqlDatabase.addDatabase("QPSQL"); > db.setHostName("localhost"); > db.setDatabaseName("e2pos"); > db.setUserName("e2pos"); > db.setPassword("emporos"); > db.setPort(5432); > db.open() > exit() > > When I run this on OS X it connects to the database(and I have done selects > and inserts from my OS X install). In windows I get the following error: > > Z:\e2pos\e2pos>python database.py > QSqlDatabase: QPSQL driver not loaded > QSqlDatabase: available drivers: > QSqlDatabase: an instance of QCoreApplication is required for loading > driver plugins > > So I am looking for confirmation that the Windows binaries that are > supplied on the PyQt download page come ready for connections to the > different DB's listed. If it is supposed to work out the box, does anyone > know what I could be doing that would cause this.
Have you actually read the error message? Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
