Integrate the Qt SDK version 4.7.4 with PostgreSQL. 9.1
-
Hello
I'm trying to integrate the Qt SDK version 4.7.4 with PostgreSQL. 9.1.
Qt is installed on partition d: \ Qt . And Postgre in c: \ PostegreSQL.
I am using Windows 7 porfissional.
Thank you.
Erico Fabiano
eng.keko @ hotmail.com -
You did read the "SQL driver":/doc/qt-4.7/sql-driver.html documentation, did you?
-
I had tried these commands ....
but did not work ....
all paths and directories are different ...
i do not have this way ... (src / plugins / sqldrivers / psql) ...
the folder that has been installed Qt have : Qt desktop, mingw, Qtceator ...
are 14 folders in total ...
where the right version of Qt and postgre should I install?sorry to have posted the question twice.
thanks ...
-
According to this "older thread":http://developer.qt.nokia.com/forums/viewthread/11047, you must add the Qt sources to the SDK installation:
bq. You must choose QtSources from Qt SDK.
Qt SDK-> Miscellaneous -> QtSourcesThen you should have a src folder that contains the sources in a plugins subfolder.
-
hello,
I followed the steps as a tutorial, but when I try to connect to the database returns me the message:server does not suport SSL, but SSL was required QPSQL: Unable do connect.
What could do to solve this problem?
Thank you.
-
hello,
I'm not able to integrate between Qt and Postgres database.
I followed the steps as the tutorial:cd% QTDIR% \ src \ plugins \ sqldrivers \ psql
qmake "IncludePath + = C: \ psql \ include" "LIBS + = C: \ psql \ lib \ ms \ libpq.lib" psql.pro
nmakeI changed the path because the folder "include" is inside the folder: "C: \ PostgreSQL \ 9.0 \ include"
and the file "libpq.lib" is inside the folder: "C: \ PostgreSQL \ 9.0 \ lib"
the file "psql.pro" in this folder: "D: \ QT \ Desktop \ Qt \ 4.7.4 \ mingw \ plugins \ sqldrivers \ psql".
and when I run nmake command returns the message: is not recognized as an internal or external command.And I do not have the folder: "Qt SDK-> Miscellaneous -> QtSources ..."
My executable is in the folder: D: \ QT \ QtCreator \ bin \ qtcreator.exe
When I run the application:
QSqlDatabase db = QSqlDatabase: addDatabase ("QPSQL");
db.setHostName ("localhost");
db.setDatabaseName ("postgres");
db.setUserName ("root");
db.setPassword ("***");returns the message: Server does not support SSL, but SSL was required QPSQL: Unable to connect.
Which version of Qt and Postgres should I install?
I'm using Win7, Qt Creator 2.3.1 Basead on Qt 4.7.4 (32bit) and Postgres 9.1.
Thank you.
Eric Fabiano
eng.keko @ hotmail.com -
[quote author="Erico Fabiano" date="1320751791"]
server does not suport SSL, but SSL was required QPSQL: Unable do connect.
[/quote]Check your postgresql.conf file and turn off the @ssl = true@ options.
-
I tried it, but don´t work...
thanks ...I need more help.
-
Have you tried to connect to the database from the psql command line or from pgadmin3? How can you connect to the database, with or without ssl? And how did you compile the postgresql driver?