Skip to main content
QtCreator Logo
Setting Up An Application With QtCreator - Linux


Introduction

This set of instructions will walk you through setting up a QtCreator C++ project from scratch.

When you have finished this tutorial you will be able to compile a working Ogre Application and you will be ready to start the Basic Tutorials.

Prerequisites

Follow the instruction at Building Your Projects With CMake to setup a CMake project.
Do not generate the project using the CMake GUI - you don't need to as QtCreator will handle the rest.

Setting up an Ogre project in QtCreator

Open project

QtCreator - File - Open File or Project:
qtCreator_cmake_1

Choose build location

qtCreator_cmake_2

Run CMake

qtCreator_cmake_3

Make in console

You need to find the qtcreator-build directory and run this in a console:

Copy to clipboard
make && make install

The reason is that it's a bit involved to set up an INSTALL build configuration in QtCreator, and it only needs to be done once.

Setup executable for project run

Now, click the green arrow in the sidebar to build and run the project.
Since we haven't set up any run configuration, we are prompted to do that in the following dialogue:
qtCreator_cmake_4
Choose build_directory/dist/bin/OgreApp as executable and build_directory/dist/bin as working directory.

Rejoice

qtCreator_cmake_5

Conclusion

As you can see, it's rather easy to setup a project in QtCreator if you use a CMake script.
QtCreator doesn't touch your source directory, except one file: CMakeLists.txt.user.