From 203ce3300a2a2e84e237c1101eed769f8e93df3c Mon Sep 17 00:00:00 2001 From: moyanj <1561515308@qq.com> Date: Mon, 9 Sep 2024 11:30:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E5=AE=9E=E7=8E=B0=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- interface/init.py | 14 ++++++++++++++ main.py | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 interface/init.py diff --git a/interface/init.py b/interface/init.py new file mode 100644 index 0000000..439b67e --- /dev/null +++ b/interface/init.py @@ -0,0 +1,14 @@ +from PyQt5.QtWidgets import QWidget, QVBoxLayout, QApplication +from qfluentwidgets import MessageBoxBase, SubtitleLabel + +class InitWindow(QWidget): + """ Custom message box """ + + def __init__(self): + super().__init__() + self.layout = QVBoxLayout(self) + self.titleLabel = SubtitleLabel('初始化') + # 将组件添加到布局中 + self.layout.addWidget(self.titleLabel) + + self.setLayout(self.layout) diff --git a/main.py b/main.py index 0f6f7de..e37e986 100644 --- a/main.py +++ b/main.py @@ -4,6 +4,7 @@ from qfluentwidgets import FluentIcon as FIF from interface.main import MainWidget from interface.setting import SettingWidget +from interface.init import InitWindow import sys # 主窗口类 @@ -25,6 +26,8 @@ class MainWindow(FluentWindow): self.init_ui() def init_ui(self): + self.w = InitWindow() + self.w.show() # 初始化菜单 self.init_menu()