From 2d2fc799bc698ebf7e7c8bcc394366d0d7bf071b Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周二, 20 2月 2024 18:18:39 +0800
Subject: [PATCH] Partially finish the bug after window close and reshow

---
 examples/mainwindow/CMakeLists.txt |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/examples/mainwindow/CMakeLists.txt b/examples/mainwindow/CMakeLists.txt
index 1554a8a..c29f2b8 100644
--- a/examples/mainwindow/CMakeLists.txt
+++ b/examples/mainwindow/CMakeLists.txt
@@ -1,15 +1,14 @@
 project(QWKExample_MainWindow)
 
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTOUIC ON)
-set(CMAKE_AUTORCC ON)
-
 file(GLOB _src *.h *.cpp)
 
-add_executable(${PROJECT_NAME})
-
-qm_configure_target(${PROJECT_NAME}
-    SOURCES ${_src}
+qwk_add_example(${PROJECT_NAME}
+    SOURCES ${_src} mainwindow.qrc ../shared/resources/shared.qrc
     QT_LINKS Core Gui Widgets
     LINKS QWKWidgets WidgetFrame
-)
\ No newline at end of file
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES
+    CXX_STANDARD 17
+    CXX_STANDARD_REQUIRED TRUE
+)

--
Gitblit v1.9.1