gui.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:fomod-designer 作者: GandaG 项目源码 文件源码
def __init__(self, parent):
        super().__init__(parent=parent)
        self.setupUi(self)

        if parent:
            self.move(
                parent.window().frameGeometry().topLeft() + parent.window().rect().center() - self.rect().center()
            )

        self.setWindowFlags(Qt.WindowTitleHint | Qt.Dialog)

        self.version.setText("Version: " + __version__)

        copyright_text = self.copyright.text()
        new_year = "2016-" + str(datetime.now().year) if datetime.now().year != 2016 else "2016"
        copyright_text = copyright_text.replace("2016", new_year)
        self.copyright.setText(copyright_text)

        self.button.clicked.connect(self.close)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号