From 69e2bda47e9713705ad5c45a08b6fc643a2b51f6 Mon Sep 17 00:00:00 2001 From: Hector <145347438+hudomn@users.noreply.github.com> Date: Mon, 15 Dec 2025 09:10:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/main_window.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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: