本文整理汇总了Python中PySide.QtGui.QSpinBox.hide方法的典型用法代码示例。如果您正苦于以下问题:Python QSpinBox.hide方法的具体用法?Python QSpinBox.hide怎么用?Python QSpinBox.hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QSpinBox
的用法示例。
在下文中一共展示了QSpinBox.hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: EditorWindow
# 需要导入模块: from PySide.QtGui import QSpinBox [as 别名]
# 或者: from PySide.QtGui.QSpinBox import hide [as 别名]
#.........这里部分代码省略.........
'''
validate xml file and write result to statusBar
'''
def validate(self):
try:
etree.fromstring(str(self.editor.toPlainText()))
self.statusBar().showMessage("Valid XML")
except etree.XMLSyntaxError as e:
if e.error_log.last_error is not None:
msg = e.error_log.last_error.message
line = e.error_log.last_error.line
col = e.error_log.last_error.column
self.statusBar().showMessage("Invalid XML: Line %s, Col %s: %s"%(line,col,msg))
except:
self.statusBar().showMessage("Invalid XML: Unknown error")
'''
close and cleanup tixi
'''
def __del__(self):
pass
#self.tixi.close()
#self.tixi.cleanup()
'''
set and connect the search buttons
'''
def setupButtonMenu(self):
self.button1 = QPushButton("previous" )
self.button2 = QPushButton("next" )
self.label1 = QLabel("font")
self.fontsizeSpinBox = QSpinBox()
self.button1.hide()
self.button2.hide()
self.label1.hide()
self.fontsizeSpinBox.hide()
self.button1.clicked.connect(self.fire_search_backward)
self.button2.clicked.connect(self.fire_search_foreward)
self.fontsizeSpinBox.setRange(4, 30)
self.fontsizeSpinBox.setSingleStep(1)
self.fontsizeSpinBox.setSuffix('pt')
self.fontsizeSpinBox.setValue(10)
self.fontsizeSpinBox.valueChanged.connect(self.setfontsize)
def setfontsize(self, value):
self.font.setPointSize(value)
self.editor.setFont(self.font)
def setupEditor(self):
self.font = QFont()
self.font.setFamily('Courier')
self.font.setFixedPitch(True)
self.font.setPointSize(10)
self.editor = EditorCodeCompletion(Config().path_code_completion_dict)
self.editor.setFont(self.font)
self.editor.setTabStopWidth(20)
self.editor.setAcceptRichText(False)
self.editor.setLineWrapMode(QTextEdit.NoWrap)
self.editor.textChanged.connect(self.validate)
self.highlighter = Highlighter(self.editor.document())