版本号

This commit is contained in:
Hector 2025-12-15 09:10:19 +08:00
parent e2e432d52d
commit 69e2bda47e

View File

@ -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: