程序关于窗口新增 GPLV3 协议显示

This commit is contained in:
gfdgd_xi 2023-01-21 09:34:57 +08:00
parent 30c833c6b9
commit 6196d4a7a4
2 changed files with 22 additions and 4 deletions

View File

@ -44,7 +44,8 @@
"18、UEngine 打包器打包的 deb 不再指定 deepin-elf-verify 依赖版本;",
"19、“更多帮助”功能支持访问云端的帮助内容",
"20、更换程序接口",
"21、优化菜单栏分类菜单栏新增图标。",
"21、优化菜单栏分类菜单栏新增图标",
"22、程序关于窗口新增 GPLV3 协议显示。",
"",
"<b>V1.8.3</b>",
"※1、修复安装/打包程序时出现找不到图标的问题;",

View File

@ -1755,6 +1755,20 @@ def showhelp():
def ChgTips():
HelpStr.setHtml(tips)
def ChgGPLV3():
try:
with open(f"{programPath}/LICENSE", "r") as file:
things = file.read()
try:
HelpStr.setMarkdown(things)
except:
# 旧版 QT 不支持 Markdown
traceback.print_exc()
HelpStr.setText(things)
except:
traceback.print_exc()
HelpStr.setText(traceback.print_exc())
def ChgAdmiration():
HelpStr.setHtml(f"""<p><b>赞赏要记得要添加备注“UEngine运行器”然后后面接自己想要备注的内容或不写</p></b>
<p><img src='{programPath}/Icon/doge.png'></p>
@ -1770,6 +1784,7 @@ def showhelp():
BtnAbout = QtWidgets.QPushButton("关于")
BtnDownN = QtWidgets.QPushButton("程序下载量")
BtnOpenN = QtWidgets.QPushButton("程序打开量")
BtnGPLV3 = QtWidgets.QPushButton("程序开源许可证")
BtnAdmiration = QtWidgets.QPushButton("赞赏(暂未开启)")
BtnAdmiration.setDisabled(True)
HelpStr = QtWidgets.QTextBrowser()
@ -1790,6 +1805,7 @@ def showhelp():
BtnGongxian.clicked.connect(ChgCon)
BtnAbout.clicked.connect(ChgAbout)
BtnDownN.clicked.connect(Download)
BtnGPLV3.clicked.connect(ChgGPLV3)
BtnAdmiration.clicked.connect(ChgAdmiration)
BtnOpenN.clicked.connect(Open)
@ -1801,9 +1817,10 @@ def showhelp():
helpLayout.addWidget(BtnGongxian, 3, 0, 1, 1)
helpLayout.addWidget(BtnDownN, 4, 0, 1, 1)
helpLayout.addWidget(BtnOpenN, 5, 0, 1, 1)
helpLayout.addWidget(BtnAdmiration, 6, 0, 1, 1)
helpLayout.addWidget(BtnAbout, 7, 0, 1, 1)
helpLayout.addWidget(HelpStr, 0, 1, 9, 1)
helpLayout.addWidget(BtnGPLV3, 6, 0, 1, 1)
helpLayout.addWidget(BtnAdmiration, 7, 0, 1, 1)
helpLayout.addWidget(BtnAbout, 8, 0, 1, 1)
helpLayout.addWidget(HelpStr, 0, 1, 10, 1)
helpWidget.setLayout(helpLayout)
helpWindow.setCentralWidget(helpWidget)