Reputation: 87
I have a problem with release application, it is don't see psql driver if i start it by exe from explorer. But it works perfect if i start it from visual studio...
I place these files near exe, and no result:
unins000.dat
msvcp140.dll
qsqlpsql.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Network.dll
Qt5Sql.dll
vccorlib140.dll
Server.exe
unins000.exe
config.json
error:
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC ODBC3 QPSQL QPSQL7
but i compiled that plugin defore!
Whats can be wrong?
Upvotes: 0
Views: 314
Reputation: 105
To deploy qt application with plugins you should also add plugins in same folder as application. How to deploy qt applications with plugins
You should also add platform folder near application to be able to deploy your application on computers where qt isn't available.
It's on Linux but same applies in windows. You can only add sqldrivers in plugins folder.
qt.conf file contaians:
[Paths]
Plugins=plugins
Also run Dependency Walker to find all dependent libraries.
Upvotes: 1