QSQL driver not found
-
Hello i'm under linux i get this error:
Starting /home/luca72/build-Panth-Desktop_Qt_5_0_2_GCC_64bit-Debug/Panth...
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITEin the folder /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/
i have only the file libqsqlpsql.soand in the folder /usr/lib/x86_64-linux-gnu/qt4/plugins/sqldrivers/
i have : libqsqlpsql.so libqsqlite.so and libqsqlmysql.so.So i don't know how i see only the driver for sqlite
Now i have to use psql, how i have to do
Thanks
-
Hi,
@
QSqlDatabase: QPSQL driver not loaded
@probaly means that the libpq.dll isn't in your PATH.
-
Hi,
Is this a program you wrote, if so what code did you use to load the driver?
-
You need to compile this driver with your new qt library, because
bq. /usr/lib/x86_64-linux-gnu/qt4/plugins/sqldrivers/
i have : libqsqlpsql.so libqsqlite.so and libqsqlmysql.so.is old one and you use another
bq. Qt_5_0_2 -
Hi,
when you use
@
QSqlDatabase::addDatabase (<driver_name>);
@Qt automatically try to load the specified driver; to successfully load driver you MUST:
- have the Qt SQL Driver Plugin installed on right Qt path
- have database client library (libpq.so for PostgreSQL) in a directory listed in PATH environment variable