Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Driver not loaded, but driver is present
Qt 6.11 is out! See what's new in the release blog

Driver not loaded, but driver is present

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 2.0k Views
  • 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.
  • M Offline
    M Offline
    Marco Sulla
    wrote on last edited by Marco Sulla
    #1

    I get this error at runtime:

    QSqlDatabase: QPSQL driver not loaded 
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
    

    As the error itself displays, postgres driver is already present. Indeed there's a qsqlpsql.dll and qsqlpsqld.dll under C:\Qt\5.8\mingw53_32\plugins\sqldrivers.
    I have not built it and I have no Postgres installation on this machine (I test on my Linux OS and deploy on Windows 8.1 VM), the driver was already present after installing QT.
    Please help me.

    S 1 Reply Last reply
    0
    • M Marco Sulla

      I get this error at runtime:

      QSqlDatabase: QPSQL driver not loaded 
      QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
      

      As the error itself displays, postgres driver is already present. Indeed there's a qsqlpsql.dll and qsqlpsqld.dll under C:\Qt\5.8\mingw53_32\plugins\sqldrivers.
      I have not built it and I have no Postgres installation on this machine (I test on my Linux OS and deploy on Windows 8.1 VM), the driver was already present after installing QT.
      Please help me.

      S Offline
      S Offline
      Stoyan
      wrote on last edited by
      #2

      @Marco-Sulla
      Beside plugins for sqldrivers you need drivers itself. For PostgreSQL 9.6 the necessary files are these:

      libeay32.dll
      libiconv-2.dll
      libintl-8.dll
      libpq.dll
      ssleay32.dll
      

      Place them in the folder of your *.exe file.
      You can get them from zip archive of the binaries if you don't want to install PostgreSQL.
      Note that you will need files for the same system version like your Qt version.
      For example:
      If you use MinGW32 (witch is only 32-bit) you need these files from 32-bit version of PostgreSQL.
      If you use MSVC x64 you need these files from 64-bit version of PostgreSQL.

      1 Reply Last reply
      2

      • Login

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