
The main.cpp, where I’ve combined all examples, looks as shown below:

For this post, I have used examples from cppreference In main.cpp file, we can include several headers that are supported in C++17. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 # You can also select to disable deprecated APIs only up to a certain version of Qt.

# In order to do so, uncomment the following line. # You can also make your code fail to compile if you use deprecated APIs. # deprecated API in order to know how to port your code away from it. # any feature of Qt which as been marked deprecated (the exact warnings # The following define makes your compiler emit warnings if you use The file Cpp17Test.pro looks as shown below: Once the right Kit is configured, we can create a simple Qt Console application named “Cpp17Test”. In Qt Creator, add Kit with the following configurations:Ĭompiler: Microsoft Visual C++ Compiler (x86_amd64) For this post, I have used Microsoft Visual C++ compiler (Microsoft Visual Studio 17 Community Edition). Next, we need to have the latest compiler which supports C++17.

To begin with, we need to have Qt 5.11 already installed. This post demonstrates a simple Qt Console application that has all of these compiler configurations so that it is easy to test C++17 features quickly using Qt project file (.pro) in QtCreator IDE. However, C++17 is not yet recognized for Qt 5.11. While using qmake as a build process for Qt projects, we can define several project configuration and compiler options using CONFIG.
