main.py 文件源码

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

项目:PointlessMaker 作者: aboood40091 项目源码 文件源码
def CreateAction(self, shortname, function, icon, text, statustext, shortcut, toggle=False):
        """
        Helper function to create an action
        From Miyamoto
        """

        if icon is not None:
            act = QtWidgets.QAction(icon, text, self)
        else:
            act = QtWidgets.QAction(text, self)

        if shortcut is not None: act.setShortcut(shortcut)
        if statustext is not None: act.setStatusTip(statustext)
        if toggle:
            act.setCheckable(True)
        if function is not None: act.triggered.connect(function)

        self.actions[shortname] = act
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号