[PyQt] PSQL
Tom Brown
brown at esteem.com
Tue Jul 24 00:41:36 BST 2007
On Monday 23 July 2007 10:43, Tom Brown wrote:
> On Monday 23 July 2007 10:24, Tom Brown wrote:
> > I have manually compiled the psql driver for Qt 4.3.0. I then compiled
> > and installed SIP and PyQt4. Then I tried running my application:
> >
> > python -O test192cfm.py
> > QSqlDatabase: QPSQL driver not loaded
> > QSqlDatabase: available drivers: QSQLITE
> > ...
> >
> > I am missing an essential step. Can anybody please tell me what that is?
>
> Ok, maybe I need to configure Qt with -plugins-sql-psql. I'm trying that
> out right now.
>
I've got this figured out. This is more of a Qt issue, but since I started the
thread here, I'll post my solution here. It may prove useful to someone else.
1) Install PostgreSQL into a directory without any spaces. e.g., C:\PostgreSQL
2) configure Qt:
configure.exe -qt-sql-psql -I C:/PostgreSQL/include -L C:/PostgreSQL/lib -l pq
3) Compile/install SIP and PyQt4.
4) Add the pg bin path to the system path:
...;C:\PostgreSQL\bin
5) Run your python app.
Works for me!
Thanks,
Tom
More information about the PyQt
mailing list