Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Integrate the Qt SDK version 4.7.4 with PostgreSQL. 9.1

Integrate the Qt SDK version 4.7.4 with PostgreSQL. 9.1

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 3 Posters 7.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Erico Fabiano
    wrote on last edited by
    #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

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      You did read the "SQL driver":/doc/qt-4.7/sql-driver.html documentation, did you?

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • E Offline
        E Offline
        Erico Fabiano
        wrote on last edited by
        #3

        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 ...

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          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 -> QtSources

          Then you should have a src folder that contains the sources in a plugins subfolder.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • E Offline
            E Offline
            Erico Fabiano
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Erico Fabiano
              wrote on last edited by
              #6

              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
              nmake

              I 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

              1 Reply Last reply
              0
              • F Offline
                F Offline
                fluca1978
                wrote on last edited by
                #7

                [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.

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  Erico Fabiano
                  wrote on last edited by
                  #8

                  I tried it, but don´t work...
                  thanks ...

                  I need more help.

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    fluca1978
                    wrote on last edited by
                    #9

                    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?

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved