当前位置: 首页>>代码示例>>Python>>正文


Python QFontDatabase.families方法代码示例

本文整理汇总了Python中PyQt4.Qt.QFontDatabase.families方法的典型用法代码示例。如果您正苦于以下问题:Python QFontDatabase.families方法的具体用法?Python QFontDatabase.families怎么用?Python QFontDatabase.families使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt4.Qt.QFontDatabase的用法示例。


在下文中一共展示了QFontDatabase.families方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setupUi

# 需要导入模块: from PyQt4.Qt import QFontDatabase [as 别名]
# 或者: from PyQt4.Qt.QFontDatabase import families [as 别名]

#.........这里部分代码省略.........
     brush = QtGui.QBrush(QtGui.QColor(80, 80, 80))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
     MainWindow.setPalette(palette)
     self.centralwidget = QtGui.QWidget(MainWindow)
     self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
     self.groupBox = QtGui.QGroupBox(self.centralwidget)
     self.groupBox.setGeometry(QtCore.QRect(70, 60, 291, 381))
     self.groupBox.setObjectName(_fromUtf8("groupBox"))
     self.listFonts = QtGui.QListWidget(self.groupBox)
     self.listFonts.setGeometry(QtCore.QRect(20, 30, 251, 331))
     self.listFonts.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
     self.listFonts.setObjectName(_fromUtf8("listFonts"))
     self.label_2 = QtGui.QLabel(self.centralwidget)
     self.label_2.setGeometry(QtCore.QRect(10, 460, 91, 61))
     self.label_2.setObjectName(_fromUtf8("label_2"))
     self.lineTempFolder = QtGui.QLineEdit(self.centralwidget)
     self.lineTempFolder.setGeometry(QtCore.QRect(120, 480, 271, 21))
     self.lineTempFolder.setObjectName(_fromUtf8("lineTempFolder"))
     self.pushQuery = QtGui.QPushButton(self.centralwidget)
     self.pushQuery.setGeometry(QtCore.QRect(150, 570, 99, 41))
     font = QtGui.QFont()
     font.setBold(True)
     font.setWeight(75)
     self.pushQuery.setFont(font)
     self.pushQuery.setObjectName(_fromUtf8("pushQuery"))
     self.label = QtGui.QLabel(self.centralwidget)
     self.label.setGeometry(QtCore.QRect(20, 10, 91, 51))
     self.label.setObjectName(_fromUtf8("label"))
     self.labPaint = QtGui.QLabel(self.centralwidget)
     self.labPaint.setGeometry(QtCore.QRect(20, 20, 591, 471))
     palette = QtGui.QPalette()
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
     brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
     brush.setStyle(QtCore.Qt.SolidPattern)
     palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
     self.labPaint.setPalette(palette)
     font = QtGui.QFont()
     font.setPointSize(18)
     self.labPaint.setFont(font)
     self.labPaint.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignTop)
     self.labPaint.setMargin(55)
     self.labPaint.setObjectName(_fromUtf8("labPaint"))
     self.lineWordList = QtGui.QLineEdit(self.centralwidget)
     self.lineWordList.setGeometry(QtCore.QRect(90, 20, 271, 21))
     self.lineWordList.setObjectName(_fromUtf8("lineWordList"))
     self.label_3 = QtGui.QLabel(self.centralwidget)
     self.label_3.setGeometry(QtCore.QRect(10, 520, 91, 61))
     self.label_3.setObjectName(_fromUtf8("label_3"))
     self.lineFolder = QtGui.QLineEdit(self.centralwidget)
     self.lineFolder.setGeometry(QtCore.QRect(120, 540, 271, 21))
     self.lineFolder.setObjectName(_fromUtf8("lineFolder"))
     MainWindow.setCentralWidget(self.centralwidget)
     self.retranslateUi(MainWindow)
     QtCore.QMetaObject.connectSlotsByName(MainWindow)
     
     
     #my code
     self.labPaint.setVisible(False)
     self.lineWordList.setText('/home/phoenix/Desktop/handcraft/lexeis.txt')
     self.lineFolder.setText("/home/phoenix/Desktop/noscale/")
     self.lineTempFolder.setText('/tmp/')
     #get installed fonts
     fontdb=QFontDatabase()
     for font in fontdb.families():
         f=QtGui.QFont(font)
         f.setPointSize(12)
         f.setPixelSize(12)
         it=QtGui.QListWidgetItem()
         it.setFont(f)
         it.setText(font)
         self.listFonts.addItem(it)
         
     
     
     #SLOTS
     QtCore.QObject.connect(self.pushQuery,QtCore.SIGNAL('clicked()'),self.GenerateSynthetic)
开发者ID:Rventric,项目名称:Bilder,代码行数:104,代码来源:KyriaForma.py


注:本文中的PyQt4.Qt.QFontDatabase.families方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。