Results 1 to 7 of 7

Thread: postgresSQL compiled but canot be used

  1. #1
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default postgresSQL compiled but canot be used

    Hi,

    I've just solved the problems around installing and building PostgresSQL, and it seems to have worked. Or at least I think so as there are these filea:
    c:\Qt\2010.05\qt\plugins\sqldrivers\libqsqlpsql4.a
    c:\Qt\2010.05\qt\plugins\sqldrivers\libqsqlpsqld4. a
    c:\Qt\2010.05\qt\plugins\sqldrivers\qsqlpsql4.dll
    c:\Qt\2010.05\qt\plugins\sqldrivers\qsqlpsqld4.dll

    When I'm trying to compile my first small testapplication, it still has the message:
    QSqlDatabase: QPSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC

    Just as if nothing has happened.
    Is there anything more I should do before using this plugin?
    Szilvi

  2. #2
    Join Date
    Aug 2009
    Location
    Greece
    Posts
    69
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: postgresSQL compiled but canot be used

    Is your bin folder of PostgreSQL in path?

  3. #3
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: postgresSQL compiled but canot be used

    Where can I set it? Is it goung to be in the pro file? I can't find the proper keywords for a succesful google search
    I'm using the Creator, I can see there is an option under Build Settings -> General, but if I'm right that is for qmake.
    Szilvi

  4. #4
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: postgresSQL compiled but canot be used

    This is a property of operating system and users session not Qt.

  5. #5
    Join Date
    Aug 2009
    Location
    Greece
    Posts
    69
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: postgresSQL compiled but canot be used


  6. #6
    Join Date
    Jan 2011
    Posts
    32
    Thanks
    11
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: postgresSQL compiled but canot be used

    In Qt Creator you can set which Qt Version to use. It seems that you have more than one version installed and QPSQL driver is not installed in one you are using.
    Try to put in your code qApp.addLibraryPath("path") where "path" is the path where your sqldrivers are installed, in your case "c:\Qt\2010.05\qt\plugins\sqldrivers". Do it before creating db connection or load the drivers and see if it works. If this is the case set the Qt version that creator use for your project.

    I am not sure if I help much. I am only a beginner in Qt.

  7. #7
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: postgresSQL compiled but canot be used

    thank you guys, tha problem was that the path was not set. When I addded, it started to live.
    Last edited by szisziszilvi; 30th March 2011 at 10:59.
    Szilvi

Similar Threads

  1. How to use a dll compiled by QT into QT
    By tonnot in forum Newbie
    Replies: 4
    Last Post: 20th November 2010, 18:59
  2. Replies: 3
    Last Post: 20th September 2010, 22:36
  3. Qwt qch compiled help
    By MikeG in forum Qwt
    Replies: 4
    Last Post: 19th June 2009, 18:08
  4. 10 GB of compiled QT
    By QPlace in forum Installation and Deployment
    Replies: 13
    Last Post: 29th April 2009, 08:05
  5. qftp in qthread canot upload file
    By cxl2253 in forum Qt Programming
    Replies: 16
    Last Post: 7th April 2007, 02:44

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.