Our project (.pro) files are parsed by a utility called qmake, which in turn generates Makefiles that drive the building of the application. We define the type of project output we want, what source files are included as well as the dependencies and much more. Much of this is achieved by simply setting variables as we will do in our project file now.
Add the following to scratchpad.pro:
TEMPLATE = app QT += qml quick CONFIG += c++14 SOURCES += main.cpp RESOURCES += qml.qrc
Let’s run through each of these lines in turn:
TEMPLATE = app
TEMPLATE tells qmake what type of project this is. In our case, it’s an executable application that is represented by app. Other values we are interested in are lib for building library binaries and subdirs ...