IDE - QtCreator

QtCreator is an IDE (Integrated Development Environment) for C++. It provides natively

QtCreator is able to load a complete project only from the generic CMakeLists.txt configuration file which is already provided. Editing a project with QtCreator doesn't impact the source files.

Note: Do not confuse the IDE QtCreator, and the library Qt.

Load project in QtCreator

In Linux, you can either

qtcreator CmakeLists.txt &

In MacOS you will have to open QtCreator from your launchpad and then follow

Whichever method you use, QtCreator should propose to configure the project. Once it is done, you will have access to the hierarchy of files from the left panel.

Compiling the code

The code can be compiled using the small hammer icon on the bottom left, or using the key shortcut: CTRL+b

If the icon is not selectable, you may have to explicitly set the mode "RelWithDebInfo" Build type to be able to run the compilation on the screen-like window above the right arrow.

Executing the code

The code can be executed using the green arrow icon on the bottom left, or using the key shortcut: CTRL+r


The path of the run directory should be set to the root directory otherwise will stop with an error message will indicate that the shader or data file cannot be read (shown in the following image).

To this end

Explanations

Automatic completion

Once the project is loaded, automatic completion will appear automatically and help you write code and use the library.

Files navigation

In addition to the file hierarchy from the left panel, you can use `CTRL+left click` on element of code to navigate through the code.



assets/05_navigation.gif

Common issue to load a project with QtCreator

When QtCreator fails to load your project it is often caused by conflicting temporary files.
In some other cases the project may load but the executable file is not found.