[Qt-interest] error trying to connect to postgreSQL database

Sean Harmer sean.harmer at maps-technology.com
Mon Aug 24 20:47:31 CEST 2009


On Monday 24 Aug 2009 19:16:49 mierdatutis mi wrote:
> Hi,
>
> I have qt 4.5 and I try to develop a program that can connect to remote
> postgreSQL database.
>
> When I try to connect the debug says me:
>
> QSqlDatabase: QPSQL driver not loaded
> QSqlDatabase: available drivers: (null)
>
> Any help?
You need to rebuild your Qt installation with support for at least the 
Postgres database driver.  To do this you need to pass in the following option 
to Qt's configure script:

-qt-sql-psql

and make sure that you have the Postgres development package installed 
(headers and libs).

What OS are you using?

Cheers,

Sean



More information about the Qt-interest-old mailing list