initial fluent-widgets ui

This commit is contained in:
2025-08-14 18:45:16 +08:00
parent 746e83ab23
commit 4c66886257
1198 changed files with 805339 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# coding:utf-8
import sys
from PySide6.QtWidgets import QApplication, QWidget
from qfluentwidgets import SwitchButton
class Window(QWidget):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.resize(160, 80)
self.switchButton = SwitchButton(parent=self)
self.switchButton.move(48, 24)
self.switchButton.checkedChanged.connect(self.onCheckedChanged)
def onCheckedChanged(self, isChecked: bool):
text = 'On' if isChecked else 'Off'
self.switchButton.setText(text)
if __name__ == '__main__':
app = QApplication(sys.argv)
w = Window()
w.show()
app.exec()