December 16, 2024 by Cristian Adam | Comments
Here are the new CMake features and fixes in Qt Creator 15:
Qt Creator 15 allows adding subprojects for CMake projects. This can be done via right-click context menu on the project and selecting New Subproject …
This newly added subproject can be independently built / clean / rebuild. Either from the right-click context menu, or from the top-level Build menu.
Notice that the Forms directory has the pencil icon in the same way as a QMake project!
This is available for the projects that have the Package manager auto-setup enabled, since currently it’s the only way for Qt Creator to integrate the following piece of CMake code:
option(QT_CREATOR_SOURCE_GROUPS "Qt Creator source groups extensions" ON) if (QT_CREATOR_SOURCE_GROUPS) source_group("Resources" REGULAR_EXPRESSION "\\.(pdf|plist|png|jpeg|jpg|storyboard|xcassets|qrc|svg|gif|ico|webp)$") source_group("Forms" REGULAR_EXPRESSION "\\.(ui)$") source_group("State charts" REGULAR_EXPRESSION "\\.(scxml)$") endif()
Below you can see that every subproject, which is marked as a folder with the CMake logo icon, now includes an Open … entry in its context menu. This action allows access to the corresponding CMakeLists.txt
file.
Notably, each CMake target has a file node with its defining CMakeLists.txt
file in the Projects view.
This change also renders the Simplify Tree view less cluttered with CMakeLists.txt
entries.
When using the FOLDER property in CMake projects for organising their structures, Qt Creator will now reflect and display these folder hierarchies.
Qt Creator 15 can load a CMake project via the <build-dir>/CMakeCache.txt
file. This is equivalent to opening the CMakeLists.txt
project and then importing the <build-dir>
configuration.
The objective here is to display the text Holiday Greetings 🌲✨ ! in the console output. Furthermore, the project has to reside within a folder named HolidayGreetings🌲✨.
The Windows configuration is a standard English (United States) language setting, as seen below:
To fulfill the need to output UTF-8 Unicode text within an English locale environment, we will use the {fmt} library, which will be supplied by Conan. The source code for CMakeLists.txt
, main.cpp
and conanfile.txt
is below:
cmake_minimum_required(VERSION 3.16)
project(HolidayGreetings🌲✨)
set(CMAKE_CXX_STANDARD 17)
find_package(fmt CONFIG REQUIRED)
add_executable(HolidayGreetings main.cpp) target_link_libraries(HolidayGreetings PRIVATE fmt::fmt)
#include <fmt/printf.h>
int main() { fmt::print("Holiday Greetings 🌲✨ !\n"); return 0; }
[requires]
fmt/11.0.0
Download the latest release here: www.qt.io/download.
Qt 6.9 is now available, with new features and improvements for application developers and device creators.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
May 14, 2025
We are happy to announce the release of Qt Creator 16.0.2! We fixed QML..
May 9, 2025
We are happy to announce the release of Qt Creator 17 Beta! You find some..
May 6, 2025
The latest release now supports two additional LLMs for code completion..