How to clone project configurations in Qt Creator?
-
Every time I upgrade to a new Qt version, I have the following problem:
I want to keep my build and run configurations for the old version around (at least for a while), and just want to add build and run configurations for the new version. I have multiple configurations (Debug, Debug without QML debugging, Release with Debug info, Sanitize...) and multiple targets, so manually adding all those (including the correct cmake variables and run settings) is quite a lot of work.Is there a way to e.g. clone all my existing configurations from Qt 6.6.3 to 6.7.2 and just adjust the necessary variables (like the Qt kit to use)?
-
In the Projects mode you can right click on the new Kit and select Copy Steps From Another Kit... :

Alternatively you can do a manual change:
- In
CMakeLists.txt.userreplace6.6.3with6.7.2, and6_6_3with6_7_2. - Rename the build directory
build/Qt_6_6_3_for_macOS-Debugtobuild/Qt_6_7_2_for_macOS-Debug - In
build/Qt_6_7_2_for_macOS-Debug/CMakeCache.txtreplace6.6.3with6.7.2, and6_6_3with6_7_2. - Delete the
build/Qt_6_7_2_for_macOS-Debug/.cmakedirectory.
Then when you load your project things would just work! 😀
- In
-
Thanks, didn't see the "Copy Steps from another kit", I have typically done it manually (in UI or CMakeLists.txt.user, but that file is close to 400k and not easy to navigate).
Is there also a way to stop the project from being parsed before I have finished updating build path etc.? When adding new kits, they always start by polluting my source folder with lots of intermediate files, until I manage to change the build folder.