本文整理汇总了Python中pyqtgraph.Qt.QtGui.QSlider方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QSlider方法的具体用法?Python QtGui.QSlider怎么用?Python QtGui.QSlider使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.Qt.QtGui
的用法示例。
在下文中一共展示了QtGui.QSlider方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initMaskFunctionControls
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QSlider [as 别名]
def initMaskFunctionControls(self):
self.maskFunctionControlslayout = QtGui.QHBoxLayout()
labelsLayout = QtGui.QVBoxLayout()
slidersLayout = QtGui.QVBoxLayout()
self.maskFunctionControlslayout.addLayout(labelsLayout)
self.maskFunctionControlslayout.addLayout(slidersLayout)
def addSlider(label, changedFunction, minimum, maximum, value):
labelWidget = QtGui.QLabel(label)
labelsLayout.addWidget(labelWidget)
slider = QtGui.QSlider(QtCore.Qt.Horizontal)
slider.setMinimum(minimum)
slider.setMaximum(maximum)
slider.setValue(value)
slider.sliderReleased.connect(changedFunction)
slidersLayout.addWidget(slider)
return slider, labelWidget
self.targetModeWindowTDOASlider, self.targetModeWindowTDOALabel = addSlider('Center:', self.tdoaRegionChanged, 0, 100, 50)
self.targetModeWindowWidthSlider, _ = addSlider('Width:', self.tdoaRegionChanged, 1, 101, 50)
self.targetModeWindowBetaSlider, _ = addSlider('Shape:', self.tdoaRegionChanged, 0, 100, 50)
self.targetModeWindowNoiseFloorSlider, _ = addSlider('Floor:', self.tdoaRegionChanged, 0, 100, 0)
示例2: getContextMenus
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QSlider [as 别名]
def getContextMenus(self, event=None):
if self.menu is None:
self.menu = QtGui.QMenu()
self.menu.setTitle(self.name+ " options..")
green = QtGui.QAction("Turn green", self.menu)
green.triggered.connect(self.setGreen)
self.menu.addAction(green)
self.menu.green = green
blue = QtGui.QAction("Turn blue", self.menu)
blue.triggered.connect(self.setBlue)
self.menu.addAction(blue)
self.menu.green = blue
alpha = QtGui.QWidgetAction(self.menu)
alphaSlider = QtGui.QSlider()
alphaSlider.setOrientation(QtCore.Qt.Horizontal)
alphaSlider.setMaximum(255)
alphaSlider.setValue(255)
alphaSlider.valueChanged.connect(self.setAlpha)
alpha.setDefaultWidget(alphaSlider)
self.menu.addAction(alpha)
self.menu.alpha = alpha
self.menu.alphaSlider = alphaSlider
return self.menu
# Define context menu callbacks
示例3: __init__
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QSlider [as 别名]
def __init__(self, inLblToolTip, parent=None):
super(QtGui.QSlider, self).__init__(parent)
self.lblToolTip = inLblToolTip