Python PyQt5.QtWidgets 模块,QFontComboBox() 实例源码

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

项目:Mac-Python-3.X    作者:L1nwatch    | 项目源码 | 文件源码
def setupUi(self, embeddedDialog):
        embeddedDialog.setObjectName("embeddedDialog")
        embeddedDialog.resize(407, 134)
        self.formLayout = QtWidgets.QFormLayout(embeddedDialog)
        self.formLayout.setObjectName("formLayout")
        self.label = QtWidgets.QLabel(embeddedDialog)
        self.label.setObjectName("label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
        self.layoutDirection = QtWidgets.QComboBox(embeddedDialog)
        self.layoutDirection.setObjectName("layoutDirection")
        self.layoutDirection.addItem("")
        self.layoutDirection.addItem("")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.layoutDirection)
        self.label_2 = QtWidgets.QLabel(embeddedDialog)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.fontComboBox = QtWidgets.QFontComboBox(embeddedDialog)
        self.fontComboBox.setObjectName("fontComboBox")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.fontComboBox)
        self.label_3 = QtWidgets.QLabel(embeddedDialog)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3)
        self.style = QtWidgets.QComboBox(embeddedDialog)
        self.style.setObjectName("style")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.style)
        self.label_4 = QtWidgets.QLabel(embeddedDialog)
        self.label_4.setObjectName("label_4")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_4)
        self.spacing = QtWidgets.QSlider(embeddedDialog)
        self.spacing.setOrientation(QtCore.Qt.Horizontal)
        self.spacing.setObjectName("spacing")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.spacing)
        self.label.setBuddy(self.layoutDirection)
        self.label_2.setBuddy(self.fontComboBox)
        self.label_3.setBuddy(self.style)
        self.label_4.setBuddy(self.spacing)

        self.retranslateUi(embeddedDialog)
        QtCore.QMetaObject.connectSlotsByName(embeddedDialog)
项目:examples    作者:pyqt    | 项目源码 | 文件源码
def setupUi(self, embeddedDialog):
        embeddedDialog.setObjectName("embeddedDialog")
        embeddedDialog.resize(407, 134)
        self.formLayout = QtWidgets.QFormLayout(embeddedDialog)
        self.formLayout.setObjectName("formLayout")
        self.label = QtWidgets.QLabel(embeddedDialog)
        self.label.setObjectName("label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
        self.layoutDirection = QtWidgets.QComboBox(embeddedDialog)
        self.layoutDirection.setObjectName("layoutDirection")
        self.layoutDirection.addItem("")
        self.layoutDirection.addItem("")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.layoutDirection)
        self.label_2 = QtWidgets.QLabel(embeddedDialog)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.fontComboBox = QtWidgets.QFontComboBox(embeddedDialog)
        self.fontComboBox.setObjectName("fontComboBox")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.fontComboBox)
        self.label_3 = QtWidgets.QLabel(embeddedDialog)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3)
        self.style = QtWidgets.QComboBox(embeddedDialog)
        self.style.setObjectName("style")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.style)
        self.label_4 = QtWidgets.QLabel(embeddedDialog)
        self.label_4.setObjectName("label_4")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_4)
        self.spacing = QtWidgets.QSlider(embeddedDialog)
        self.spacing.setOrientation(QtCore.Qt.Horizontal)
        self.spacing.setObjectName("spacing")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.spacing)
        self.label.setBuddy(self.layoutDirection)
        self.label_2.setBuddy(self.fontComboBox)
        self.label_3.setBuddy(self.style)
        self.label_4.setBuddy(self.spacing)

        self.retranslateUi(embeddedDialog)
        QtCore.QMetaObject.connectSlotsByName(embeddedDialog)
项目:pyqt5-example    作者:guinslym    | 项目源码 | 文件源码
def setupUi(self, embeddedDialog):
        embeddedDialog.setObjectName("embeddedDialog")
        embeddedDialog.resize(407, 134)
        self.formLayout = QtWidgets.QFormLayout(embeddedDialog)
        self.formLayout.setObjectName("formLayout")
        self.label = QtWidgets.QLabel(embeddedDialog)
        self.label.setObjectName("label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
        self.layoutDirection = QtWidgets.QComboBox(embeddedDialog)
        self.layoutDirection.setObjectName("layoutDirection")
        self.layoutDirection.addItem("")
        self.layoutDirection.addItem("")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.layoutDirection)
        self.label_2 = QtWidgets.QLabel(embeddedDialog)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.fontComboBox = QtWidgets.QFontComboBox(embeddedDialog)
        self.fontComboBox.setObjectName("fontComboBox")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.fontComboBox)
        self.label_3 = QtWidgets.QLabel(embeddedDialog)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3)
        self.style = QtWidgets.QComboBox(embeddedDialog)
        self.style.setObjectName("style")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.style)
        self.label_4 = QtWidgets.QLabel(embeddedDialog)
        self.label_4.setObjectName("label_4")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_4)
        self.spacing = QtWidgets.QSlider(embeddedDialog)
        self.spacing.setOrientation(QtCore.Qt.Horizontal)
        self.spacing.setObjectName("spacing")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.spacing)
        self.label.setBuddy(self.layoutDirection)
        self.label_2.setBuddy(self.fontComboBox)
        self.label_3.setBuddy(self.style)
        self.label_4.setBuddy(self.spacing)

        self.retranslateUi(embeddedDialog)
        QtCore.QMetaObject.connectSlotsByName(embeddedDialog)