HoYoCenter/interface/setting.py

15 lines
450 B
Python
Raw Normal View History

2024-09-08 19:53:00 +08:00
from PyQt5.QtWidgets import QWidget, QHBoxLayout
from qfluentwidgets import FluentIcon as FIF
2024-09-08 20:57:25 +08:00
from .json_edit import CodeEditor
2024-09-08 21:14:02 +08:00
import json
2024-09-08 15:48:25 +08:00
class SettingWidget(QWidget):
def __init__(self, title="设置"):
super().__init__()
2024-09-08 19:53:00 +08:00
self.base = QHBoxLayout(self)
2024-09-08 21:14:02 +08:00
json.load(open("config.json"))
c1 = CodeEditor(open("config.json").read())
2024-09-08 19:53:00 +08:00
self.base.addWidget(c1)
self.setLayout(self.base) # 设置布局