diff --git a/interface/init/about.py b/interface/init/about.py index b37e224..39a3492 100644 --- a/interface/init/about.py +++ b/interface/init/about.py @@ -2,6 +2,4 @@ from PyQt5.QtWidgets import QWidget class AboutWidget(QWidget): def __init__(self, typex="init"): - self.init_ui() - - def init_ui() \ No newline at end of file + \ No newline at end of file diff --git a/interface/setting.py b/interface/setting.py index d269b41..6f3e691 100644 --- a/interface/setting.py +++ b/interface/setting.py @@ -35,7 +35,7 @@ class SettingWidget(QWidget): def save(self): # 保存配置到 JSON 文件 - with open("config.json", "w") as config_file: + with open(os.path.join(env.dirs.user_config_path, "config.json"), "w") as config_file: config_file.write(self.c1.toPlainText()) InfoBar.success( @@ -50,7 +50,7 @@ class SettingWidget(QWidget): def reload(self): # 重新加载 JSON 配置 - with open("config.json", "r") as config_file: + with open(os.path.join(env.dirs.user_config_path, "config.json"), "r") as config_file: config_data = config_file.read() self.c1.setPlainText(config_data)