初步实现初始化窗口
This commit is contained in:
parent
c49d38cdd5
commit
203ce3300a
14
interface/init.py
Normal file
14
interface/init.py
Normal file
|
@ -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)
|
3
main.py
3
main.py
|
@ -4,6 +4,7 @@ from qfluentwidgets import FluentIcon as FIF
|
||||||
|
|
||||||
from interface.main import MainWidget
|
from interface.main import MainWidget
|
||||||
from interface.setting import SettingWidget
|
from interface.setting import SettingWidget
|
||||||
|
from interface.init import InitWindow
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# 主窗口类
|
# 主窗口类
|
||||||
|
@ -25,6 +26,8 @@ class MainWindow(FluentWindow):
|
||||||
self.init_ui()
|
self.init_ui()
|
||||||
|
|
||||||
def init_ui(self):
|
def init_ui(self):
|
||||||
|
self.w = InitWindow()
|
||||||
|
self.w.show()
|
||||||
# 初始化菜单
|
# 初始化菜单
|
||||||
self.init_menu()
|
self.init_menu()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user