views:

1791

answers:

2

Hi to all,

 I am developing an application using QtRuby and postgresql. I sucessfully developed and running sucessfully in Linux. Now i want to run the same application in windows. But i am failing to connect to database(Postgresql). I am getting the following errors:

 QSqlDatabase: QPSQL driver not loaded
 QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC

Can any one help how to resolve my problem. I am waiting for your replies.

Regards,

Narasimha Raju.Naidu

+1  A: 

As the error message says, the QPSQL driver is not available for Qt to talk to Postgres with. Probably the plugin has not been compiled yet.

As this how-to indicates, you need to install the PostgreSQL developer libraries, and then manually build the Qt driver plugin. See the how-to for the exact commands.

MattJ
Thanks for your reply. I compiled driver and it generated qsqlpsql4.dll, but still i am getting the same error. What should i do now.
A: 

Hello dummystories,

Did you resolve your problem? I have the same.

UPDATE: I've got the solution: http://qtwiki.org/QPSQL_driver_not_loaded_-_unusual_solution

Thanks, Aliaksei

AVarabei