本文整理匯總了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