Working with Qt Creator

Settings (MSYS2)

Setup CMake-Kit

  1. Add CMake under Tools -> Options -> Kits -> CMake

    ../../_images/qtcreator_settings_cmake.png
  2. Add C and C++ Compilers under Tools -> Options -> Kits -> Compilers

    ../../_images/qtcreator_settings_g++.png
    ../../_images/qtcreator_settings_gcc.png
  3. Add Debugger under Tools -> Options -> Kits -> Debuggers

    ../../_images/qtcreator_settings_gdb.png
  4. Add Kit under Tools -> Options -> Kits -> Kits

    ../../_images/qtcreator_settings_kit.png
  5. Adjust CMake Generator under Tools -> Options -> Kits -> Kits to MSYS Makefiles

    ../../_images/qtcreator_settings_cmake_generator.png

    Note

    Change the environment variable to MAKEFLAGS=-j4 (or similar) to enable parallel building on the kit level.

Setup Project

  1. Load the project by opening a CMakeLists.txt file and configure it to use the new kit.

  2. Setup missing CMake flags (c.f. :ref:’CMake’)

    Todo

    The configuration is still “itchy”, as Qt creator changes the interface with every version

Settings (Linux)

Setup Kit

Qt Creator should be able to come up with a suiteable kit for developing openPASS on its own. If not, check if all Installing Prerequisites are met. Also, the steps above should be a good indicator, where to look for potential troubles.

Setup Project

  1. Load the project by opening a CMakeLists.txt file and configure it to use a proper kit.

  2. Setup missing CMake flags (c.f. :ref:’CMake’)

    Todo

    The configuration is still “itchy”, as Qt creator changes the interface with every version

Alternative Method

Version Issues

Qt Creator is constantly improving the CMake integration. Unfortunatly, some versions seem to be buggy.

Tested Versions: 4.13.2 | 4.12.2

  1. Follow the install instructions to invoke cmake from within your own build directory. - Execute the step for build-release - Execute the step for build-debug

  2. Open Qt Creator

  3. Open CMakeLists.txt

  4. Qt Creator should find the configured build directories and create a temporary kit

    ../../_images/qtcreator_project_cmake.png
    ../../_images/qtcreator_project_loaded.png
    ../../_images/qtcreator_project_cmake_settings.png