diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.6.x.txt b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.6.x.txt index 66c34759f37..63e7b2e30d9 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.6.x.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.6.x.txt @@ -7,17 +7,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.2 COMPONENTS Quick REQUIRED) -qt_add_executable(%{ProjectName} +qt_add_executable(%{TargetName} main.cpp ) -qt_add_qml_module(%{ProjectName} +qt_add_qml_module(%{TargetName} URI %{ProjectName} VERSION 1.0 QML_FILES main.qml %{AdditionalQmlFiles} ) -target_compile_definitions(%{ProjectName} +target_compile_definitions(%{TargetName} PRIVATE $<$,$>:QT_QML_DEBUG>) -target_link_libraries(%{ProjectName} +target_link_libraries(%{TargetName} PRIVATE Qt6::Quick) diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/empty/wizard.json b/share/qtcreator/templates/wizards/projects/qtquickapplication/empty/wizard.json index 401fb21e16c..a6f538e1be1 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/empty/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/empty/wizard.json @@ -27,7 +27,8 @@ { "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" }, { "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }, { "key": "AdditionalQmlFiles", "value": "" }, - { "key": "AdditionalQmlFilesQbs", "value": "" } + { "key": "AdditionalQmlFilesQbs", "value": "" }, + { "key": "TargetName", "value": "%{JS: 'app' + value('ProjectName')}" } ], "pages":