cool_menu.py 文件源码

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

项目:gpvdm 作者: roderickmackenzie 项目源码 文件源码
def __init__(self,parent):
        QToolBar.__init__(self)

        #aaa=self.readStyleSheet(os.path.join(get_css_path(),"menu.css"))
        #aaa=str(aaa,'utf-8')
        #self.setStyleSheet(aaa)

        self.setToolButtonStyle( Qt.ToolButtonTextBesideIcon)
        self.setOrientation(Qt.Vertical)
        #self.setWindowFlags(Qt.FramelessWindowHint|Qt.WindowStaysOnTopHint|Qt.WindowStaysOnTopHint)
        self.setIconSize(QSize(42, 42))

        self.configure_configwindow = QAction(QIcon_load("help"), _("Help window"), self)
        self.addAction(self.configure_configwindow)

        self.configure_configwindow = QAction(QIcon_load("help"), _("Manual"), self)
        self.addAction(self.configure_configwindow)

        self.configure_configwindow = QAction(QIcon_load("help"), _("License"), self)
        self.addAction(self.configure_configwindow)

        self.configure_configwindow = QAction(QIcon_load("help"), _("Youtube"), self)
        self.addAction(self.configure_configwindow)

        self.configure_configwindow = QAction(QIcon_load("help"), _("Citing the model"), self)
        self.addAction(self.configure_configwindow)

        self.configure_configwindow = QAction(QIcon_load("help"), _("About"), self)
        self.addAction(self.configure_configwindow)

        l=self.layout()
        for i in range(0,l.count()):
            l.itemAt(i).setAlignment(Qt.AlignLeft)


        self.installEventFilter(self)
        self.setWindowFlags(Qt.Popup)

        self.move(self.mapFromGlobal(QCursor.pos()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号