How to use qmake for creating .pro files
-
No, I mean that you can avoid creating them by hand since Qt Creator offers the possibility to create them for you. You can very well add them to a project without copying them.
That's normal, you should use the full path to your qmake version.
-
You are calling qmake without giving the full path to qmake as in
C:\Qt\5.5\msvc_2013\bin\qmake.IIRC you might also have the option to open a pre-populated command line from Qt's entry in the start menu. That way you will have a console ready to be used.
-
My qmake.exe file is in the
binfolder in the following path:
C:\Qt\Qt5.5.1\5.5\mingw492_32\bin
I retried using qmake here and apparently it succeeded but the projectmyqtappdoesn't still contain a .pro file and Run triangle is still grayed out.
It's here.But please bear in mind that I've installed two Qt Creator IDEs:
Qt creator IDE v. 5.5.1 (Qt Creator (Community))
and also Qt Creator 3.6.0And I use Qt Creator 3.6.0 and the path above (to me) belongs to Qt creator IDE v. 5.5.1 not Qt Creator 3.6.0! That's why no changes in the project happen.
-
I meant: from the folder where you files are, call qmake with the full path:
cd C:\Users\CS\Documents\Qt\Forms\ C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\qmake -project -
It worked!! Great :-)
Thank you very much. You solved the issue I was involving in for days. Thanks so much. :-)And just for sureness:
After qmake, I double clicked on the .pro file made. It took me to a page "configure project". I clicked on the "configure" button there. Then CTRL+R.An error: while building/deploying project from (kit: Desktop)
I went to: Tools > Options > Build & Run > Kits > Compiler: (here I chose MinGW 4.9.2 32-bit ) > OK
Then CTRL+RAnother error:
C:\Users\CS\Documents\Qt\Forms\main.cpp:1: error: QApplication: No such file or directory
#include <QApplication>
^
Probably it's of the codes and has nothing to do with the work qmake done.
If I cannot solve this issue, I try to post this in another thread. -
You need to edit the .pro file and add QT +=
widgets. The project functionality generates a "skeleton" that you have to adjust a bit depending on what you used in your code. -
You're welcome !
Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)