mirror of
https://github.com/LC044/WeChatMsg
synced 2024-11-12 20:21:21 +08:00
使用浏览器打开关于页面的超链接
This commit is contained in:
parent
4cfc48a9a1
commit
90037f8cb5
@ -17,6 +17,6 @@ about = f'''
|
||||
地址:<a href='{github}'>{github}</a><br>
|
||||
官网:<a href='{website}'>{website}</a><br>
|
||||
新特性:<br>{''.join(['' + i for i in description])}<br>
|
||||
License <a href='https://github.com/LC044/WeChatMsg/blob/master/LICENSE'>{license}</a><br>
|
||||
License <a href='https://github.com/LC044/WeChatMsg/blob/master/LICENSE' target='_blank'>{license}</a><br>
|
||||
Copyright {copyright}
|
||||
'''
|
||||
|
@ -1,4 +1,4 @@
|
||||
from PyQt5.QtCore import QSize
|
||||
from PyQt5.QtCore import QSize, QUrl
|
||||
from PyQt5.QtGui import QPixmap
|
||||
from PyQt5.QtWidgets import QApplication, QDialog
|
||||
|
||||
@ -26,7 +26,13 @@ class AboutDialog(QDialog, Ui_Dialog):
|
||||
self.label_weixin.setPixmap(pixmap)
|
||||
self.label_version.setText('《留痕》')
|
||||
self.textBrowser.setHtml(config.about)
|
||||
self.textBrowser.setOpenExternalLinks(True)
|
||||
self.textBrowser.anchorClicked.connect(self.handleAnchorClicked)
|
||||
|
||||
|
||||
def handleAnchorClicked(self, url):
|
||||
# 打开默认浏览器
|
||||
QUrl(url).openUrl(url)
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user