On Mar 18, 2010, at 11:03 AM, Phil Thompson wrote: > 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
wow that is embarrassing. I had it working in OS X and I latched onto the idea that it must be a missing driver in windows. I am sorry to waste your time. Brandon Orther Developer | Emporos Systems Corporation [email protected] www.emporos.net _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
