April 2018
Intermediate to advanced
404 pages
8h 27m
English
You can add different Qt modules, configuration options, and definitions to your project. Let's take a look at how we can achieve these. To add additional modules, you simply add the module keyword behind QT +=, like so:
QT += core gui sql printsupport charts multimedia
Or you can also add in a condition in front to determine when to add a specific module to your project:
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
You can also add configuration settings to your project. For example, we want to specifically ask the compiler to follow the 2011 version of the C++ specifications (known as C++11) when compiling our project, as well as making it a multithreaded application:
CONFIG += qt c++11 thread ...
Read now
Unlock full access