Solved Basic Qt Creator Qmake Config
-
Hi,
I have a basic project Qt project that I am working with. This is my first time using Qt Creator. I am trying to build for both Mac and Windows, and would like the setup to be as simple as possible (i.e. open the project, select a kit, hit build and then deploy). I am trying to use
.pro
project files withqmake
to achieve this.In my project file, I specify a couple of options, for example:
QT += core gui
And:
settings.files = $$PWD/settings.txt settings.path = $$OUT_PWD INSTALLS += settings
I would think this results in two things:
- The Qt Core and GUI DLLs are copied to the build directory.
- The file
settings.txt
is copied to the build directory.
But what actually happens:
- No DLLs are copied and running the
.exe
results in an error statingQt5Core.dll was not found
. - No
settings.txt
file in the build folder.
All of this is playing around with the
analogclock
example.Am I doing something wrong? Do these options not do what I think they do? Do I need to configure something in Qt Creator?
Thanks!
-
Hi and welcome to devnet,
The INSTALL variable is used for the "make install" command not on build.
If you want to deploy your application on Windows then you should use windeployqt.
-
I tried windeployqt. It will copy the DLLs. But I also already knew which ones I needed, so the auto-detection part is not very helpful. It also does not copy my settings file. Can this not be done/configured via the Qt Creator deploy process? Thanks!
-
Add a custom build step to call make install.
-
This post is deleted! -