Qt Project (.pro) files
The .pro
files created by Qt Creator in the earlier examples are actually Qt project files. A .pro
file contains all the information required by qmake
to build an application, a library, or a plugin. A project file supports both simple and complex build systems. A simple project file may use straightforward declarations, defining standard variables to indicate the source and header files that are used in a project. Complex projects may use multiple flow structures to optimize the build process. A project file contains a series of declarations to specify resources, such as links to the source and header files, libraries required by a project, custom-build processes for different platforms, and so on.
A Qt project file has several sections and uses certain predefined qmake
variables. Let's have a look here at our earlier HelloWorld
example .pro
file:
QTÂ Â Â Â Â Â Â += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets...