From 29686d07ba81b75bd91325c2fc797e116ce292a4 Mon Sep 17 00:00:00 2001 From: liuzhangjian Date: Tue, 14 Jan 2025 20:16:31 +0800 Subject: [PATCH] fix: Fix compilation error QApplication: No such file or directory --- example/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 88e96e32..9d4218ec 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -24,8 +24,8 @@ else () endif () #导入Qt相关依赖包 -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick Svg Network) -find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick Svg Network) +find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick Svg Network Widgets) +find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick Svg Network Widgets) #添加国际化脚本 find_program(QT_LUPDATE NAMES lupdate lupdate-qt6) @@ -141,6 +141,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Widgets fluentuiplugin )