diff --git a/ui/main_window.py b/ui/main_window.py index 7823a081..286191f6 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -1424,22 +1424,19 @@ class MainWindow(QMainWindow): # 帮助菜单 self.helpMenu = menubar.addMenu('帮助') self.aboutAction = self.helpMenu.addAction('关于') - - try: - import json - with open('new/project.json','r',encoding='utf-8')as f: - project_data = json.load(f) - version = project_data.get('version','1.0') - self.aboutAction.setText(f'关于 v{version}') - except Exception as e: - print(f"无法读取项目信息: {e}") - self.aboutAction.setText('关于 v1.0') - + self.aboutAction.triggered.connect(self.showAboutDialog) tool_menu = self.menuBar().addMenu("配置") plugin_config_action = tool_menu.addAction("渲染管线插件配置") plugin_config_action.triggered.connect(self.open_plugin_config_dialog) + def showAboutDialog(self): + msgBox = QMessageBox() + msgBox.setWindowTitle("关于") + msgBox.setText(f'元泰引擎系统\nMetaCore\n版本:v1.0') + msgBox.setIcon(QMessageBox.NoIcon) + msgBox.exec_() + def open_plugin_config_dialog(self): """打开插件配置对话框""" try: