.pro file created by creator and created by qmake command
-
When I create a project from Qt Creator, a .pro file is created:
@QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
...
@after that, I run qmake -project, above content is replaced with :
@INCLUDEPATH += .
...
@So, the .pro file created by the Creator should be used and we should NOT do qmake -project for an existing project. Am I right?
-
[quote author="koahnig" date="1373555135"]Obviously your qt creator is aware of Qt 5. So maybe version 2.6 or 2.7.
What is your version of qmake? Is it one of Qt 4? [/quote]It comes with the Qt Creater 5.0.2.
QMake version 3.0
Using Qt version 5.0.2 in C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\lib -
Hi, why do you want to re-generate the project file if you already have a working one?
Qt Creator 's wizards can create the basic project file suitable for Qt4 and Qt5.
While qmake -project is normally used to generate a basic project file if you already has source code files.
-
[quote author="1+1=2" date="1373558267"]Hi, why do you want to re-generate the project file if you already have a working one?
Qt Creator 's wizards can create the basic project file suitable for Qt4 and Qt5.
While qmake -project is normally used to generate a basic project file if you already has source code files.
[/quote]For one thing you are right, why redoing something already available and functioning. However, one would expect that either way is generating something functioning.
@user001: So the question would be, is the qmake generated version also working?
If no, you might want to check on "JIRA":https://bugreports.qt-project.org/secure/Dashboard.jspa for a bug report or file one, if none is already there. -
What Qt Creator does:
- When you create a Qt project, you need to select a suitable wizard or template.
- The wizard will generate source codes file according to your selected template.
- Then it will generate a .pro file will manage your source codes files.
- You can build and run this application without writing any code now.
What qmake does:
- You already has source code files. For example, you has just create a file called main.cpp, or you have a project which managed by another tools such as CMake.
- run qmake -project to generate a .pro file based on the files in CWD.
- The created .pro file probably will need to be edited. For example add the QT variable to specify what modules are required.