KeyPress/src/gui/about_dialog.py

29 lines
928 B
Python

from PyQt5.QtWidgets import QDialog, QVBoxLayout, QLabel, QPushButton
class AboutDialog(QDialog):
def __init__(self, parent=None):
super().__init__(parent)
self.setWindowTitle("关于")
self.setFixedSize(400, 200)
layout = QVBoxLayout()
title = QLabel("KeyPresser", self)
title.setStyleSheet("font-size: 18pt; font-weight: bold;")
layout.addWidget(title)
desc = QLabel("一个简单的按键模拟工具", self)
layout.addWidget(desc)
version = QLabel("版本: 专业版 (Python 无钩子版)", self)
layout.addWidget(version)
author = QLabel("作者: xiao liu", self)
layout.addWidget(author)
ok_button = QPushButton("确定", self)
ok_button.clicked.connect(self.accept)
layout.addWidget(ok_button)
self.setLayout(layout)