QT GUI Slidervariable_qtgui_sliderQT GUI Widgetsfrom PyQt4 import Qtimport PyQt4.Qwt5 as Qwtself.$(id) = $(id) = $value#set $win = '_%s_layout'%$id
$win = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom)
self._$(id)_tool_bar = Qt.QToolBar(self)
$(win).addWidget(self._$(id)_tool_bar)
#if not $label()
#set $label = '"%s"'%$id
#end if
self._$(id)_tool_bar.addWidget(Qt.QLabel($label, None))
self._$(id)_counter = Qwt.QwtCounter(None)
self._$(id)_counter.setRange($start, $stop, $step)
self._$(id)_counter.setNumButtons(2)
self._$(id)_counter.setValue($value)
self._$(id)_tool_bar.addWidget(self._$(id)_counter)
self._$(id)_counter.valueChanged.connect(self.set_$(id))
self._$(id)_slider = Qwt.QwtSlider(None)
self._$(id)_slider.setRange($start, $stop, $step)
self._$(id)_slider.setValue($value)
self._$(id)_slider.setOrientation(Qt.$orient)
self._$(id)_slider.setScalePosition($orient.scalepos)
self._$(id)_slider.valueChanged.connect(self.set_$(id))
$(win).addWidget(self._$(id)_slider)
$(gui_hint()($win))self.set_$(id)($value)self._$(id)_counter.setValue($id)self._$(id)_slider.setValue($id)Labellabelstring#if $label() then 'none' else 'part'#Default Valuevalue50realStartstart0realStopstop100realStepstep1realOrientationorientQt.HorizontalenumpartGUI Hintgui_hintgui_hintpart$start <= $value <= $stop$start < $stop
This block creates a variable with a slider. \
Leave the label blank to use the variable id as the label. \
The value must be a real number. \
The value must be between the start and the stop.
The GUI hint can be used to position the widget within the application. \
The hint is of the form [tab_id@tab_index]: [row, col, row_span, col_span]. \
Both the tab specification and the grid position are optional.