From bb27db586d77535e7964d60c080f7698b30e2902 Mon Sep 17 00:00:00 2001 From: congsh Date: Thu, 12 Feb 2026 13:08:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0main()=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E4=BD=9C=E4=B8=BA=E5=BA=94=E7=94=A8=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在main_window.py末尾添加main()函数用于启动应用 --- src/gui/main_window.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gui/main_window.py b/src/gui/main_window.py index 403ff2d..53a9e1f 100644 --- a/src/gui/main_window.py +++ b/src/gui/main_window.py @@ -584,3 +584,17 @@ class NavigationButton(QPushButton): if icon_path: self.setIcon(QIcon(icon_path)) self.setIconSize(QSize(20, 20)) + + +def main(): + """ + 应用程序入口 + + 初始化并显示主窗口 + """ + app = QApplication(sys.argv) + + window = MainWindow() + window.show() + + sys.exit(app.exec())