From f3053a70762959bbe7394ed581eb464c2eaeeb7f Mon Sep 17 00:00:00 2001 From: hewenfei Date: Tue, 13 Dec 2022 16:33:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BAqtcreator=E5=A2=9E=E5=8A=A0=E8=AF=86?= =?UTF-8?q?=E5=88=ABqml=E6=A8=A1=E5=9D=97=E7=9A=84QML=5FIMPORT=5FPATH?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13bd674..e88bcfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,11 @@ include_directories(src/appdata) include_directories(src/settings) include_directories(src/uiconfig) +# 用于Qt Creator识别自定义qml模块的导入路径 +list(APPEND QML_MODULE_DIRS "${PROJECT_SOURCE_DIR}/qml") +set(QML_IMPORT_PATH "${QML_MODULE_DIRS}" CACHE STRING "Qt Creator extra qml import paths." FORCE) +message(STATUS "QML_IMPORT_PATH: ${QML_IMPORT_PATH}") + # 基础设置 set(UKUI_MENU_DATA_DIR "/usr/share/ukui-menu") set(UKUI_MENU_TRANSLATION_DIR "${UKUI_MENU_DATA_DIR}/translations")