本文整理汇总了Python中PySide.QtGui.QListWidget.setFont方法的典型用法代码示例。如果您正苦于以下问题:Python QListWidget.setFont方法的具体用法?Python QListWidget.setFont怎么用?Python QListWidget.setFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QListWidget
的用法示例。
在下文中一共展示了QListWidget.setFont方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mainwin
# 需要导入模块: from PySide.QtGui import QListWidget [as 别名]
# 或者: from PySide.QtGui.QListWidget import setFont [as 别名]
#.........这里部分代码省略.........
def addmenu(self, target, actions):
for action in actions:
if action is None:
target.addSeparator()
else:
target.addAction(action)
#Actions
def addwrdf(self):
self.dlg = addawrd()
self.dlg.show()
self.connect(self.dlg.buttonBox, SIGNAL("rejected()"), self.dlg.close)
self.connect(self.dlg.buttonBox, SIGNAL("accepted()"), self.addawordtodb)
def addawordtodb(self):
eng = self.dlg.lineEdit.text()
tam = self.dlg.lineEdit_2.text()
if len(eng) != 0 and len(tam) != 0:
cur.execute("INSERT INTO ENGTAM(ENGW, TAMW) VALUES(?, ?)", (eng, tam, ))
self.dlg.close()
QMessageBox.information(self, "Nigandu Eng -> Tam Dictionary", "Added Successfully. . .")
else:
self.dlg.lineEdit.setFocus()
self.dlg.close()
QMessageBox.warning(self, "Nigandu Eng -> Tam Dictionary", "Invalid Entry. . .")
def optionsf(self):
self.opt = optdlg(self)
self.opt.spinBox.setProperty("value", int(self.fontsize))
font = QFont()
font.setPixelSize(int(self.fontsize))
self.opt.sampletxt.setFont(font)
if str(self.clipauto) == "True":
self.opt.checkclip.setChecked(True)
elif str(self.clipauto) == "False":
self.opt.checkclip.setChecked(False)
if str(self.histdock) == "True":
self.opt.checkshowhistdock.setChecked(True)
elif str(self.histdock) == "False":
self.opt.checkshowhistdock.setChecked(False)
if str(self.bkmdock) == "True":
self.opt.checkshowbkmdock.setChecked(True)
elif str(self.bkmdock) == "False":
self.opt.checkshowbkmdock.setChecked(False)
self.opt.show()
self.connect(self.opt.buttonBox, SIGNAL("accepted()"), self.optok)
self.connect(self.opt.buttonBox.button(QDialogButtonBox.Apply), SIGNAL("clicked()"), self.optapply)
self.connect(self.opt.checkdelhist, SIGNAL("stateChanged(int)"), self.deleteallhist)
self.connect(self.opt.checkshowhistdock, SIGNAL("stateChanged(int)"), self.shownexttime)
self.connect(self.opt.checkshowbkmdock, SIGNAL("stateChanged(int)"), self.shownexttime)
def shownexttime(self, i):
if i == 0:
pass
if i == 2:
QMessageBox.information(self, self.windowTitle(), "Click Apply or Ok \n The Dock window will be added, \n the next time you start the application. . .")
def optok(self):
self.optapply()
self.opt.close()