代码拉取完成,页面将自动刷新
from PyQt5 import QtWidgets, QtCore
from PyQt5.QtWidgets import QDialog, QLabel, QGridLayout
from configs.strings import translate
class AboutDialog(QDialog):
def __init__(self, lang):
super().__init__()
self.setWindowTitle(translate['ABOUT'][lang])
self.resize(400, 300)
authorLabel.setAlignment(QtCore.Qt.AlignHCenter)
dateLabel = QLabel(make_font("Last Build Date: 2021/01/09"))
dateLabel.setAlignment(QtCore.Qt.AlignHCenter)
otherLabel = QLabel(make_font('This is a pyqt app to simplify local resume search.'))
otherLabel.setAlignment(QtCore.Qt.AlignHCenter)
self.buttons = QtWidgets.QDialogButtonBox(
QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
layout = QGridLayout()
layout.addWidget(authorLabel, 0, 0)
layout.addWidget(dateLabel, 1, 0)
layout.addWidget(otherLabel, 2, 0)
layout.addWidget(self.buttons, 3, 0)
self.setLayout(layout)
self.buttons.accepted.connect(self.accept)
self.buttons.rejected.connect(self.reject)
def make_font(msg=''):
"""
To set font of text show in text
:param msg: message to show
:return: matched font
"""
return '<font size={} color="{}" face="{}"> {} </font>'.format(4, "black", "verdana", msg)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。