Qt Creator 2.7 add new disabled

  1. Add the file to the CMakeLists.txt file.

    Note: If you added another file while working on the same project, that new .cpp file would already be added in the same folder structure as your current project. In that case, no changes to CMakeLists.txt are required.

  2. Now simply, right click on the project entry and click on "Run CMake". This will automatically add the newly created .cpp file to the project structure and it will be shown in the project outline view.


That's because you have to add the file/s in CMakeLists.txt and this makes sense because you explicitly choosing cmake over the internal building system.

Tags:

Qt Creator