Python PyQt5.QtGui 模块,QLabel() 实例源码

我们从Python开源项目中,提取了以下12个代码示例,用于说明如何使用PyQt5.QtGui.QLabel()

项目:vivisect-py3    作者:bat-serjo    | 项目源码 | 文件源码
def _getNodeWidget(self, nid, ninfo):

        wid = ninfo.get('widget')
        if wid is None:
            rep = ninfo.get('repr')
            if rep is None:
                rep = 'node: %s' % nid

            wid = QtGui.QLabel(rep)
            ninfo['widget'] = wid

        gproxy = ninfo.get('gproxy')
        if gproxy is None:
            gproxy = self.scene().addWidget(wid)
            # Nodes always get drawn on top!
            # gproxy.setZValue( 1.0 )
            ninfo['gproxy'] = gproxy
            geom = gproxy.geometry()
            ninfo['size'] = (int(geom.width()), int(geom.height()))

        return gproxy
项目:ReadManga    作者:kanishka-linux    | 项目源码 | 文件源码
def __init(self, parent):
        QLabel.__init__(self, parent)
项目:vivisect-py3    作者:bat-serjo    | 项目源码 | 文件源码
def __init__(self, vw, vwgui):
        self.vw = vw
        self.vwgui = vwgui

        QtGui.QToolBar.__init__(self, parent=vwgui)
        self.addWidget(QtGui.QLabel('Example Toolbar:', parent=self))
        self.addAction('ONE', self.doOne)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        QtWidgets.QLabel.__init__(self)
        self._pixmap = QtGui.QPixmap(self.pixmap())
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        QtWidgets.QLabel.__init__(self)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init(self, parent):
        QLabel.__init__(self, parent)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init(self, parent):
        QLabel.__init__(self, parent)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        QtWidgets.QLabel.__init__(self)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init(self, parent):
        QLabel.__init__(self, parent)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init(self, parent):
        QLabel.__init__(self, parent)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init__(self,parent=None):
        QtWidgets.QMenu.__init__(self, "File", parent)
        global epnArrList

        self.status_playlist = True

        self.initial_width = 100
        self.initial_height = 100

        self.l = QtWidgets.QLabel()
        self.l.setMaximumSize(QtCore.QSize(280, 250))
        self.l.setMinimumSize(QtCore.QSize(280, 250))
        self.l.setText(_fromUtf8(""))
        self.l.setScaledContents(True)
        self.l.setObjectName(_fromUtf8("l_label"))
        self.l.hide()

        self.h_mode = QtWidgets.QAction("&Hide", self)
        self.h_mode.triggered.connect(self._hide_mode)
        self.addAction(self.h_mode)
        self.h_mode.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.m_mode = QtWidgets.QAction("&Music Mode", self)
        self.m_mode.triggered.connect(ui.music_mode_layout)
        self.addAction(self.m_mode)
        self.m_mode.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.v_mode = QtWidgets.QAction("&Video Mode", self)
        self.v_mode.triggered.connect(ui.video_mode_layout)
        self.addAction(self.v_mode)
        self.v_mode.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.d_vid = QtWidgets.QAction("&Detach Video", self)
        self.d_vid.triggered.connect(self._detach_video)
        self.addAction(self.d_vid)
        self.d_vid.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        if ui.window_frame == 'true':
            self.frameless_mode = QtWidgets.QAction("&Remove Window Frame", self)
        else:
            self.frameless_mode = QtWidgets.QAction("&Allow Window Frame", self)
        self.frameless_mode.triggered.connect(self._remove_frame)
        self.addAction(self.frameless_mode)
        self.frameless_mode.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.exitAction = QtWidgets.QAction("&Exit", self)
        self.exitAction.triggered.connect(QtWidgets.qApp.quit)
        self.addAction(self.exitAction)
        self.exitAction.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.title = QtWidgets.QAction("Title", self)
        self.title.triggered.connect(self.info_action_icon)
        self.title.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.title1 = QtWidgets.QAction("Title1", self)
        self.title1.triggered.connect(self.info_action_icon)
        self.title1.setFont(QtGui.QFont('SansSerif', 10,italic=False))
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def __init__(self,parent=None):
        QtWidgets.QMenu.__init__(self, "File", parent)
        global epnArrList

        self.status_playlist = True

        self.initial_width = 100
        self.initial_height = 100

        self.l = QtWidgets.QLabel()
        self.l.setMaximumSize(QtCore.QSize(280, 250))
        self.l.setMinimumSize(QtCore.QSize(280, 250))
        self.l.setText(_fromUtf8(""))
        self.l.setScaledContents(True)
        self.l.setObjectName(_fromUtf8("l_label"))
        self.l.hide()

        self.h_mode = QtWidgets.QAction("&Hide", self)
        self.h_mode.triggered.connect(self._hide_mode)
        self.addAction(self.h_mode)
        self.h_mode.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.m_mode = QtWidgets.QAction("&Music Mode", self)
        self.m_mode.triggered.connect(ui.music_mode_layout)
        self.addAction(self.m_mode)
        self.m_mode.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.v_mode = QtWidgets.QAction("&Video Mode", self)
        self.v_mode.triggered.connect(ui.video_mode_layout)
        self.addAction(self.v_mode)
        self.v_mode.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.d_vid = QtWidgets.QAction("&Detach Video", self)
        self.d_vid.triggered.connect(self._detach_video)
        self.addAction(self.d_vid)
        self.d_vid.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        if ui.window_frame == 'true':
            self.frameless_mode = QtWidgets.QAction("&Remove Window Frame", self)
        else:
            self.frameless_mode = QtWidgets.QAction("&Allow Window Frame", self)
        self.frameless_mode.triggered.connect(self._remove_frame)
        self.addAction(self.frameless_mode)
        self.frameless_mode.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.exitAction = QtWidgets.QAction("&Exit", self)
        self.exitAction.triggered.connect(QtWidgets.qApp.quit)
        self.addAction(self.exitAction)
        self.exitAction.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.title = QtWidgets.QAction("Title", self)
        self.title.triggered.connect(self.info_action_icon)
        self.title.setFont(QtGui.QFont('SansSerif', 10,italic=False))

        self.title1 = QtWidgets.QAction("Title1", self)
        self.title1.triggered.connect(self.info_action_icon)
        self.title1.setFont(QtGui.QFont('SansSerif', 10,italic=False))