2024-09-08 15:48:25 +08:00
|
|
|
from PyQt5.QtWidgets import QWidget
|
2024-09-08 20:57:25 +08:00
|
|
|
from qfluentwidgets import VBoxLayout, LargeTitleLabel
|
2024-09-08 15:25:21 +08:00
|
|
|
|
|
|
|
class MainWidget(QWidget):
|
|
|
|
def __init__(self, title="主页"):
|
|
|
|
super().__init__()
|
2024-09-08 20:57:25 +08:00
|
|
|
self.base = VBoxLayout(self)
|
2024-09-08 19:53:00 +08:00
|
|
|
|
2024-09-08 20:57:25 +08:00
|
|
|
self.base.addWidget(LargeTitleLabel(title)) # 创建按钮并添加到布局
|
|
|
|
self.setLayout(self.base) # 设置布局
|