本文整理汇总了Python中PyQt4.QtGui.QDoubleSpinBox.setKeyboardTracking方法的典型用法代码示例。如果您正苦于以下问题:Python QDoubleSpinBox.setKeyboardTracking方法的具体用法?Python QDoubleSpinBox.setKeyboardTracking怎么用?Python QDoubleSpinBox.setKeyboardTracking使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QDoubleSpinBox
的用法示例。
在下文中一共展示了QDoubleSpinBox.setKeyboardTracking方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initUI
# 需要导入模块: from PyQt4.QtGui import QDoubleSpinBox [as 别名]
# 或者: from PyQt4.QtGui.QDoubleSpinBox import setKeyboardTracking [as 别名]
def initUI(self):
self.grid = QGridLayout(self)
self.setLayout(self.grid)
self.loadSettings()
self.inputLabels = [QLabel(l) for l in self.Inputs]
self.inputBoxes = []
for i, iL in enumerate(self.inputLabels):
self.grid.addWidget(iL, i, 0)
sp = QDoubleSpinBox(self)
sp.setRange(-1e10, 1e10)
sp.setKeyboardTracking(False)
self.grid.addWidget(sp, i, 1)
self.inputBoxes.append(sp)
for val, iB in zip(self.inputValues, self.inputBoxes):
iB.setValue(val)
self.connectSpinBoxes()
self.outputValues = [0.0]*len(self.Outputs)
self.outputLabels = [QLabel(l) for l in self.Outputs]
self.outputValueLabels = [QLabel('0.0') for l in self.Outputs]
sI = len(self.inputLabels)
for i, oL in enumerate(self.outputLabels):
self.grid.addWidget(oL, sI + i, 0)
self.grid.addWidget(self.outputValueLabels[i], sI + i, 1)
示例2: createDoubleSpinner
# 需要导入模块: from PyQt4.QtGui import QDoubleSpinBox [as 别名]
# 或者: from PyQt4.QtGui.QDoubleSpinBox import setKeyboardTracking [as 别名]
def createDoubleSpinner(self, minimum, maximum):
spinner = QDoubleSpinBox()
spinner.setEnabled(False)
spinner.setMinimumWidth(75)
spinner.setRange(minimum, maximum)
spinner.setKeyboardTracking(False)
spinner.editingFinished.connect(self.spinning)
spinner.valueChanged.connect(self.spinning)
return spinner
示例3: createDoubleSpinner
# 需要导入模块: from PyQt4.QtGui import QDoubleSpinBox [as 别名]
# 或者: from PyQt4.QtGui.QDoubleSpinBox import setKeyboardTracking [as 别名]
def createDoubleSpinner(self, minimum, maximum):
spinner = QDoubleSpinBox()
spinner.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
spinner.setMinimumWidth(105)
spinner.setRange(minimum, maximum)
spinner.setKeyboardTracking(False)
spinner.setDecimals(8)
spinner.editingFinished.connect(self.plotScaleChanged)
spinner.valueChanged.connect(self.plotScaleChanged)
return spinner
示例4: populateGuessBoxes
# 需要导入模块: from PyQt4.QtGui import QDoubleSpinBox [as 别名]
# 或者: from PyQt4.QtGui.QDoubleSpinBox import setKeyboardTracking [as 别名]
def populateGuessBoxes(self):
self.guessBox = []
self.fitBox = []
sI = 1 # TODO: do something smart about this
for i, n in enumerate(self.fitter.parameterNames):
spGuess = QDoubleSpinBox(self)
spGuess.setRange(-1e10, 1e10)
spGuess.setKeyboardTracking(False)
spFit = QLabel('0.0')
self.parmGrid.addWidget(QLabel(n, parent=self), i+sI+1, 0)
self.parmGrid.addWidget(spGuess, i+sI+1, 1)
self.parmGrid.addWidget(spFit, i+sI+1, 2)
self.guessBox.append(spGuess)
self.fitBox.append(spFit)
self.connectGuessBoxes()