def __init__(self, parent=None):
"""Display a dialog that shows application information."""
super(AboutDialog, self).__init__(parent)
self.setWindowTitle('About')
help_icon = pkg_resources.resource_filename('{{ cookiecutter.package_name }}.images',
'ic_help_black_48dp_1x.png')
self.setWindowIcon(QIcon(help_icon))
self.resize(300, 200)
author = QLabel('{{ cookiecutter.full_name }}')
author.setAlignment(Qt.AlignCenter)
icons = QLabel('Material design icons created by Google')
icons.setAlignment(Qt.AlignCenter)
github = QLabel('GitHub: {{ cookiecutter.github_username }}')
github.setAlignment(Qt.AlignCenter)
self.layout = QVBoxLayout()
self.layout.setAlignment(Qt.AlignVCenter)
self.layout.addWidget(author)
self.layout.addWidget(icons)
self.layout.addWidget(github)
self.setLayout(self.layout)
{{cookiecutter.application_name}}.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录