當前位置: 首頁>>代碼示例>>Python>>正文


Python QtWidgets.QLabel方法代碼示例

本文整理匯總了Python中Qt.QtWidgets.QLabel方法的典型用法代碼示例。如果您正苦於以下問題:Python QtWidgets.QLabel方法的具體用法?Python QtWidgets.QLabel怎麽用?Python QtWidgets.QLabel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Qt.QtWidgets的用法示例。


在下文中一共展示了QtWidgets.QLabel方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setupUi

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(573, 391)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.table = QtWidgets.QTableWidget(Dialog)
        self.table.setObjectName("table")
        self.table.setColumnCount(0)
        self.table.setRowCount(0)
        self.verticalLayout.addWidget(self.table)
        self.label = QtWidgets.QLabel(Dialog)
        font = QtWidgets.QFont()
        font.setPointSize(12)
        font.setWeight(75)
        font.setItalic(False)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.label.setTextFormat(QtCore.Qt.AutoText)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
開發者ID:weijer,項目名稱:NukeToolSet,代碼行數:27,代碼來源:shortcuts_UIs.py

示例2: __init__

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def __init__(self, label, widget, parent=None, hideLabel=False, maxLabelWidth=None, toolTip=""):
        super(PropertyEntry, self).__init__(parent)
        self.label = label
        self.layout = QtWidgets.QHBoxLayout(self)
        self.layout.setContentsMargins(1, 1, 1, 1)
        if not hideLabel:
            label = QtWidgets.QLabel(label + ":")
            label.setStyleSheet("font: bold")
            label.setToolTip(toolTip)
            if not maxLabelWidth:
                label.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred))
            else:
                label.setMaximumWidth(maxLabelWidth)
            self.layout.addWidget(label)
        self.layout.addWidget(widget)
        self.index = -1 
開發者ID:wonderworks-software,項目名稱:PyFlow,代碼行數:18,代碼來源:PropertiesFramework.py

示例3: setupUi

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(228, 30)
        self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
        self.horizontalLayout.setSpacing(1)
        self.horizontalLayout.setContentsMargins(1, 1, 1, 1)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.widget = QtWidgets.QWidget(Form)
        self.widget.setObjectName("widget")
        self.horizontalLayout.addWidget(self.widget)
        self.labelName = QtWidgets.QLabel(Form)
        self.labelName.setObjectName("labelName")
        self.horizontalLayout.addWidget(self.labelName)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.pbKill = QtWidgets.QPushButton(Form)
        self.pbKill.setMaximumSize(QtCore.QSize(40, 16777215))
        self.pbKill.setText("")
        self.pbKill.setObjectName("pbKill")
        self.horizontalLayout.addWidget(self.pbKill)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
開發者ID:wonderworks-software,項目名稱:PyFlow,代碼行數:25,代碼來源:VariableForm_ui.py

示例4: setupUi

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def setupUi(self, QSpectrumAnalyzerPersistence):
        QSpectrumAnalyzerPersistence.setObjectName("QSpectrumAnalyzerPersistence")
        QSpectrumAnalyzerPersistence.resize(250, 130)
        self.verticalLayout = QtWidgets.QVBoxLayout(QSpectrumAnalyzerPersistence)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setObjectName("formLayout")
        self.label_2 = QtWidgets.QLabel(QSpectrumAnalyzerPersistence)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.decayFunctionComboBox = QtWidgets.QComboBox(QSpectrumAnalyzerPersistence)
        self.decayFunctionComboBox.setObjectName("decayFunctionComboBox")
        self.decayFunctionComboBox.addItem("")
        self.decayFunctionComboBox.addItem("")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.decayFunctionComboBox)
        self.label = QtWidgets.QLabel(QSpectrumAnalyzerPersistence)
        self.label.setObjectName("label")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
        self.persistenceLengthSpinBox = QtWidgets.QSpinBox(QSpectrumAnalyzerPersistence)
        self.persistenceLengthSpinBox.setProperty("value", 5)
        self.persistenceLengthSpinBox.setObjectName("persistenceLengthSpinBox")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.persistenceLengthSpinBox)
        self.verticalLayout.addLayout(self.formLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(QSpectrumAnalyzerPersistence)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.label_2.setBuddy(self.decayFunctionComboBox)
        self.label.setBuddy(self.persistenceLengthSpinBox)

        self.retranslateUi(QSpectrumAnalyzerPersistence)
        self.decayFunctionComboBox.setCurrentIndex(1)
        self.buttonBox.accepted.connect(QSpectrumAnalyzerPersistence.accept)
        self.buttonBox.rejected.connect(QSpectrumAnalyzerPersistence.reject)
        QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerPersistence)
        QSpectrumAnalyzerPersistence.setTabOrder(self.decayFunctionComboBox, self.persistenceLengthSpinBox)
        QSpectrumAnalyzerPersistence.setTabOrder(self.persistenceLengthSpinBox, self.buttonBox) 
開發者ID:xmikos,項目名稱:qspectrumanalyzer,代碼行數:42,代碼來源:ui_qspectrumanalyzer_persistence.py

示例5: setupUi

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def setupUi(self, QSpectrumAnalyzerBaseline):
        QSpectrumAnalyzerBaseline.setObjectName("QSpectrumAnalyzerBaseline")
        QSpectrumAnalyzerBaseline.resize(500, 100)
        self.verticalLayout = QtWidgets.QVBoxLayout(QSpectrumAnalyzerBaseline)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setObjectName("formLayout")
        self.label = QtWidgets.QLabel(QSpectrumAnalyzerBaseline)
        self.label.setObjectName("label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.baselineFileEdit = QtWidgets.QLineEdit(QSpectrumAnalyzerBaseline)
        self.baselineFileEdit.setObjectName("baselineFileEdit")
        self.horizontalLayout.addWidget(self.baselineFileEdit)
        self.baselineFileButton = QtWidgets.QToolButton(QSpectrumAnalyzerBaseline)
        self.baselineFileButton.setMinimumSize(QtCore.QSize(50, 0))
        self.baselineFileButton.setObjectName("baselineFileButton")
        self.horizontalLayout.addWidget(self.baselineFileButton)
        self.formLayout.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout)
        self.verticalLayout.addLayout(self.formLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 1, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(QSpectrumAnalyzerBaseline)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.label.setBuddy(self.baselineFileEdit)

        self.retranslateUi(QSpectrumAnalyzerBaseline)
        self.buttonBox.accepted.connect(QSpectrumAnalyzerBaseline.accept)
        self.buttonBox.rejected.connect(QSpectrumAnalyzerBaseline.reject)
        QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerBaseline)
        QSpectrumAnalyzerBaseline.setTabOrder(self.baselineFileEdit, self.baselineFileButton) 
開發者ID:xmikos,項目名稱:qspectrumanalyzer,代碼行數:37,代碼來源:ui_qspectrumanalyzer_baseline.py

示例6: __init__

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def __init__(self, parent=None):
        super(ReplacePath, self).__init__(parent)
        self.resize(500, 100)
        self.setWindowTitle('Replace Read Node Path')
        self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.WindowCloseButtonHint | QtCore.Qt.WindowMinimizeButtonHint)
        main_layout = QtGui.QVBoxLayout(self)
        main_layout.setSpacing(15)

        source_label = QtGui.QLabel('Source Path')
        self.source_le = QtGui.QLineEdit()
        target_label = QtGui.QLabel('Target Path')
        self.target_le = QtGui.QLineEdit()
        self.replace_btn = QtGui.QPushButton('Replace')
        self.replace_btn.clicked.connect(self.do_replace)

        source_layout = QtGui.QHBoxLayout()
        source_layout.addWidget(source_label)
        source_layout.addWidget(self.source_le)

        target_layout = QtGui.QHBoxLayout()
        target_layout.addWidget(target_label)
        target_layout.addWidget(self.target_le)

        main_layout.addLayout(source_layout)
        main_layout.addLayout(target_layout)
        main_layout.addWidget(self.replace_btn) 
開發者ID:weijer,項目名稱:NukeToolSet,代碼行數:28,代碼來源:replace_read_node_path.py

示例7: __setParameters

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def __setParameters(self, params):
        self.__param_container = params
        for info in params.getParamInfos():
            p_name, p_label, p_type, p_default = info
            widget, function = ParameterFunctions.CreateWidget(info)
            if widget:
                layout = QtWidgets.QHBoxLayout()
                label = QtWidgets.QLabel(p_label)
                label.setObjectName("parameter_label")
                layout.addWidget(label)
                layout.addWidget(widget)

                self.__params.append({"name": p_name, "widget": widget, "function": function})
                self.__qt_parameter_layout.addLayout(layout) 
開發者ID:sol-ansano-kim,項目名稱:medic,代碼行數:16,代碼來源:widgets.py

示例8: __init__

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def __init__(self, raw_node):
        super(UIImageDisplayNode, self).__init__(raw_node)
        self.resizable = True
        self.Imagelabel = QLabel("test3")
        self.pixmap = QtGui.QPixmap(RESOURCES_DIR + "/wizard-cat.png")
        self.addWidget(self.Imagelabel)
        self.updateSize()
        self._rawNode.loadImage.connect(self.onLoadImage) 
開發者ID:wonderworks-software,項目名稱:PyFlow,代碼行數:10,代碼來源:UIImageDisplayNode.py

示例9: __init__

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def __init__(self, parent, factor, *args, **kwargs):
        """
        :param parent: parent Widget
        :type parent: QtWidget
        :param factor: amount to increment the value
        :type factor: float/int
        """
        super(inputDragger, self).__init__(*args, **kwargs)
        self.parent = parent
        self.setLayout(QtWidgets.QVBoxLayout())
        self.frame = QtWidgets.QGroupBox()
        self.frame.setLayout(QtWidgets.QVBoxLayout())
        self.label = QtWidgets.QLabel("+" + str(factor))
        self.frame.setContentsMargins(0, 0, 0, 0)
        self.frame.layout().setContentsMargins(0, 0, 0, 0)
        self.frame.layout().setSpacing(0)
        self.layout().setContentsMargins(0, 0, 0, 0)
        self.layout().setSpacing(0)
        font = self.label.font()
        font.setPointSize(7)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.frame.layout().addWidget(self.label)
        self.layout().addWidget(self.frame)
        self.setStyleSheet(editableStyleSheet().getSliderStyleSheet("draggerstyleSheet"))
        self.size = 35
        self.setMinimumHeight(self.size)
        self.setMinimumWidth(self.size)
        self.setMaximumHeight(self.size)
        self.setMaximumWidth(self.size)
        self._factor = factor
        self.setAttribute(QtCore.Qt.WA_Hover)
        self.installEventFilter(self)
        self.label.installEventFilter(self) 
開發者ID:wonderworks-software,項目名稱:PyFlow,代碼行數:36,代碼來源:QtSliders.py

示例10: __init__

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def __init__(self, rawVariable, variablesWidget, parent=None):
        super(UIVariable, self).__init__(parent)
        self._rawVariable = rawVariable
        self.variablesWidget = variablesWidget
        # ui
        self.horizontalLayout = QHBoxLayout(self)
        self.horizontalLayout.setSpacing(1)
        self.horizontalLayout.setContentsMargins(1, 1, 1, 1)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.widget = TypeWidget(findPinClassByType(self._rawVariable.dataType).color(), self)
        self.widget.setObjectName("widget")
        self.horizontalLayout.addWidget(self.widget)
        self.labelName = QLabel(self)
        self.labelName.setStyleSheet("background:transparent")
        self.labelName.setObjectName("labelName")
        self.horizontalLayout.addWidget(self.labelName)
        spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        # find refs
        self.pbFindRefs = QPushButton("")
        self.pbFindRefs.setIcon(QtGui.QIcon(":/searching-magnifying-glass.png"))
        self.pbFindRefs.setObjectName("pbFindRefs")
        self.horizontalLayout.addWidget(self.pbFindRefs)
        self.pbFindRefs.clicked.connect(self.onFindRefsClicked)
        #  kill variable
        self.pbKill = QPushButton("")
        self.pbKill.setIcon(QtGui.QIcon(":/delete_icon.png"))
        self.pbKill.setObjectName("pbKill")
        self.horizontalLayout.addWidget(self.pbKill)
        self.pbKill.clicked.connect(self.onKillClicked)

        QtCore.QMetaObject.connectSlotsByName(self)
        self.setName(self._rawVariable.name)
        self._rawVariable.setWrapper(self) 
開發者ID:wonderworks-software,項目名稱:PyFlow,代碼行數:36,代碼來源:UIVariable.py

示例11: setupUi

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(341, 363)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setSpacing(1)
        self.verticalLayout.setContentsMargins(1, 1, 1, 1)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.pbNewVar = QtWidgets.QPushButton(Form)
        self.pbNewVar.setMaximumSize(QtCore.QSize(50, 16777215))
        self.pbNewVar.setObjectName("pbNewVar")
        self.horizontalLayout.addWidget(self.pbNewVar)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.wListWidget = QtWidgets.QWidget(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.wListWidget.sizePolicy().hasHeightForWidth())
        self.wListWidget.setSizePolicy(sizePolicy)
        self.wListWidget.setObjectName("wListWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.wListWidget)
        self.gridLayout.setContentsMargins(1, 1, 1, 1)
        self.gridLayout.setObjectName("gridLayout")
        self.lytListWidget = QtWidgets.QVBoxLayout()
        self.lytListWidget.setContentsMargins(0, 0, 0, 0)
        self.lytListWidget.setObjectName("lytListWidget")
        self.gridLayout.addLayout(self.lytListWidget, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.wListWidget)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
開發者ID:wonderworks-software,項目名稱:PyFlow,代碼行數:39,代碼來源:VariablesWidget_ui.py

示例12: setupUi

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def setupUi(self, QSpectrumAnalyzerSmoothing):
        QSpectrumAnalyzerSmoothing.setObjectName("QSpectrumAnalyzerSmoothing")
        QSpectrumAnalyzerSmoothing.resize(250, 130)
        self.verticalLayout = QtWidgets.QVBoxLayout(QSpectrumAnalyzerSmoothing)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setObjectName("formLayout")
        self.label = QtWidgets.QLabel(QSpectrumAnalyzerSmoothing)
        self.label.setObjectName("label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
        self.windowFunctionComboBox = QtWidgets.QComboBox(QSpectrumAnalyzerSmoothing)
        self.windowFunctionComboBox.setObjectName("windowFunctionComboBox")
        self.windowFunctionComboBox.addItem("")
        self.windowFunctionComboBox.addItem("")
        self.windowFunctionComboBox.addItem("")
        self.windowFunctionComboBox.addItem("")
        self.windowFunctionComboBox.addItem("")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.windowFunctionComboBox)
        self.label_2 = QtWidgets.QLabel(QSpectrumAnalyzerSmoothing)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.windowLengthSpinBox = QtWidgets.QSpinBox(QSpectrumAnalyzerSmoothing)
        self.windowLengthSpinBox.setMinimum(3)
        self.windowLengthSpinBox.setMaximum(1001)
        self.windowLengthSpinBox.setProperty("value", 11)
        self.windowLengthSpinBox.setObjectName("windowLengthSpinBox")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.windowLengthSpinBox)
        self.verticalLayout.addLayout(self.formLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 1, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(QSpectrumAnalyzerSmoothing)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.label.setBuddy(self.windowFunctionComboBox)
        self.label_2.setBuddy(self.windowLengthSpinBox)

        self.retranslateUi(QSpectrumAnalyzerSmoothing)
        self.windowFunctionComboBox.setCurrentIndex(1)
        self.buttonBox.accepted.connect(QSpectrumAnalyzerSmoothing.accept)
        self.buttonBox.rejected.connect(QSpectrumAnalyzerSmoothing.reject)
        QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerSmoothing)
        QSpectrumAnalyzerSmoothing.setTabOrder(self.windowFunctionComboBox, self.windowLengthSpinBox)
        QSpectrumAnalyzerSmoothing.setTabOrder(self.windowLengthSpinBox, self.buttonBox) 
開發者ID:xmikos,項目名稱:qspectrumanalyzer,代碼行數:47,代碼來源:ui_qspectrumanalyzer_smoothing.py

示例13: setupUi

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(465, 393)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, 20, -1, 20)
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.icon_lb = QtWidgets.QLabel(Dialog)
        font = QtWidgets.QFont()
        font.setPointSize(20)
        self.icon_lb.setFont(font)
        self.icon_lb.setText("")
        self.icon_lb.setObjectName("icon_lb")
        self.horizontalLayout.addWidget(self.icon_lb)
        self.title_lb = QtWidgets.QLabel(Dialog)
        font = QtWidgets.QFont()
        font.setPointSize(20)
        self.title_lb.setFont(font)
        self.title_lb.setObjectName("title_lb")
        self.horizontalLayout.addWidget(self.title_lb)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.text_link_lb = QtWidgets.QLabel(Dialog)
        self.text_link_lb.setObjectName("text_link_lb")
        self.verticalLayout.addWidget(self.text_link_lb)
        self.textBrowser = QtWidgets.QTextBrowser(Dialog)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout.addWidget(self.textBrowser)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.donate_btn = QtWidgets.QPushButton(Dialog)
        self.donate_btn.setObjectName("donate_btn")
        self.horizontalLayout_2.addWidget(self.donate_btn)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.verticalLayout.setStretch(2, 1)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
開發者ID:weijer,項目名稱:NukeToolSet,代碼行數:44,代碼來源:about_UIs.py

示例14: __createWidgets

# 需要導入模塊: from Qt import QtWidgets [as 別名]
# 或者: from Qt.QtWidgets import QLabel [as 別名]
def __createWidgets(self):
        main_layout = QtWidgets.QVBoxLayout()
        self.setLayout(main_layout)
        main_layout.setContentsMargins(0, 0, 0, 0)

        # frame
        frame = QtWidgets.QFrame()
        frame.setObjectName("detail_frame")
        main_layout.addWidget(frame)
        frame_layout = QtWidgets.QVBoxLayout()
        frame.setLayout(frame_layout)
        frame_layout.setContentsMargins(10, 10, 10, 10)

        # layout
        self.__qt_parameter_layout = QtWidgets.QVBoxLayout()
        button_layout = QtWidgets.QHBoxLayout()

        # widgets
        self.__qt_tester_label = QtWidgets.QLabel()
        self.__qt_description = QtWidgets.QTextEdit()
        self.__qt_description.setFixedHeight(50)
        self.__qt_description.setReadOnly(True)
        self.__qt_tester_label.setObjectName("detail_tester_label")
        self.__qt_description.setObjectName("detail_tester_description")
        self.__qt_report_list = ReportList()
        self.__qt_report_list.setObjectName("detial_report_list")
        self.__qt_fix_selected_button = QtWidgets.QPushButton("Fix Selected")
        self.__qt_fix_all_button = QtWidgets.QPushButton("Fix All")
        self.__qt_fix_selected_button.setObjectName("detail_button")
        self.__qt_fix_all_button.setObjectName("detail_button")
        self.__qt_fix_selected_button.setMaximumWidth(100)
        self.__qt_fix_all_button.setMaximumWidth(100)

        button_layout.addWidget(self.__qt_fix_selected_button)
        button_layout.addWidget(self.__qt_fix_all_button)

        frame_layout.addWidget(self.__qt_tester_label)
        frame_layout.addSpacing(20)
        frame_layout.addWidget(self.__qt_description)
        frame_layout.addWidget(self.__qt_report_list)
        frame_layout.addLayout(self.__qt_parameter_layout)
        frame_layout.addLayout(button_layout)

        self.__qt_fix_all_button.clicked.connect(self.__fixAll)
        self.__qt_fix_selected_button.clicked.connect(self.__fixSelected) 
開發者ID:sol-ansano-kim,項目名稱:medic,代碼行數:47,代碼來源:widgets.py


注:本文中的Qt.QtWidgets.QLabel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。