diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl index 6878a1023c3..9daf9759b19 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl @@ -10,6 +10,11 @@ set(CMAKE_AUTOMOC ON) find_package(QT NAMES Qt6 COMPONENTS Gui Qml Quick) find_package(Qt6 REQUIRED COMPONENTS Core Qml Quick) +# To build this application you need Qt 6.2.0 or higher +if (Qt6_VERSION VERSION_LESS 6.2.0) +message(FATAL_ERROR "You need Qt 6.2.0 or newer to build the application.") +endif() + qt_add_executable(${CMAKE_PROJECT_NAME} src/main.cpp) # qt_standard_project_setup() requires Qt 6.3 or higher. See https://doc.qt.io/qt-6/qt-standard-project-setup.html for details.