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


Python QDoubleSpinBox.setKeyboardTracking方法代码示例

本文整理汇总了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)
开发者ID:shreyaspotnis,项目名称:ipbec,代码行数:30,代码来源:Analyzer.py

示例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
开发者ID:shulNN,项目名称:ert,代码行数:11,代码来源:plot_scale_widget.py

示例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
开发者ID:danielfmva,项目名称:ert,代码行数:14,代码来源:plot_scale_widget.py

示例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()
开发者ID:shreyaspotnis,项目名称:ipbec,代码行数:19,代码来源:Fitter.py


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