Cant connect to database if application is not opened via QT creator
-
Hi
yes, use http://www.dependencywalker.com/
and check the the exe and the sql plugin if it has other
requirements not copied.Alternativ also try with
http://doc.qt.io/qt-5/windows-deployment.htmland see what it copies.
-
-the windeployqt wont start on my machine.
Really ?
What does it say ?Also, just for check. This is a release .exe u are testing with?
Also did u run Walker on the SQL plugin and see if it needs extra?
Its often something like that. -
Did you have a look at http://doc.qt.io/qt-5/windows-deployment.html as suggested by @mrjj?
The windeployqt will copy all neccessary (Qt) dll files and folders into the folder where your compiled exe file is. In case of SQL you will also need the
sqldriversfolder and the dll file(s) in there. -
-the windeployqt wont start on my machine.
Really ?
What does it say ?Also, just for check. This is a release .exe u are testing with?
Also did u run Walker on the SQL plugin and see if it needs extra?
Its often something like that. -
Did you have a look at http://doc.qt.io/qt-5/windows-deployment.html as suggested by @mrjj?
The windeployqt will copy all neccessary (Qt) dll files and folders into the folder where your compiled exe file is. In case of SQL you will also need the
sqldriversfolder and the dll file(s) in there. -
@mrjj I double click on the windeployqt, and window shows up for a second, but then it disappears. Yes, this is a release exe
@mardzo said in Cant connect to database if application is not opened via QT creator:
@mrjj I double click on the windeployqt, and window shows up for a second, but then it disappears
It is a commandline tool, so you can not just double click it from the file browser.
-
@mrjj I double click on the windeployqt, and window shows up for a second, but then it disappears. Yes, this is a release exe
@mardzo said in Cant connect to database if application is not opened via QT creator:
I double click on the windeployqt, and window shows up for a second, but then it disappears. Yes, this is a release exe
You should read its documentation and not just double click on it (it is a command line tool not a GUI application).
-
Im sorry guys i have never used it before. But now i did and windeployqt copied the same folder sqldrivers and also the others needed imageformats, platforms etc... I still have the same problem. If a Qt installation is not present, i cant connect to the db
-
Im sorry guys i have never used it before. But now i did and windeployqt copied the same folder sqldrivers and also the others needed imageformats, platforms etc... I still have the same problem. If a Qt installation is not present, i cant connect to the db
-
Im sorry guys i have never used it before. But now i did and windeployqt copied the same folder sqldrivers and also the others needed imageformats, platforms etc... I still have the same problem. If a Qt installation is not present, i cant connect to the db
@mardzo said in Cant connect to database if application is not opened via QT creator:
Im sorry guys i have never used it before. But now i did and windeployqt copied the same folder sqldrivers and also the others needed imageformats, platforms etc... I still have the same problem. If a Qt installation is not present, i cant connect to the db
What does your directory structure look like for your app after windeploy?
It should be something like this:
<root of your app> plugins/ images/ platforms/ sqldrivers/ *.exe *.dllThen you may also need a qt.conf file with this in the root of your app:
[Paths] Plugins = pluginsThat should get you working and connected.