

def __init__(self, min, max, default=None, parent=None):
    '\n        :param min: Minimum slider value\n        :param max: Maximum slider value\n        :param default: Initial value\n        :param parent: Widget parent\n        '
    super(LabeledSlider, self).__init__(parent)
    self._slider = QtGui.QSlider()
    self._slider.setMinimum(0)
    self._slider.setMaximum(100)
    self._slider.setOrientation(Qt.Horizontal)
    self._min = min
    self._ptp = (max - min)
    self._isint = (isinstance(min, int) and isinstance(max, int) and isinstance(default, (int, type(None))))
    if (default is None):
        default = ((min + max) / 2)
    self.set_value(default)
    self._lbl = QtGui.QLabel(str(self.value()))
    self._l = QtGui.QHBoxLayout()
    self._l.setContentsMargins(2, 2, 2, 2)
    self._l.addWidget(self._slider)
    self._l.addWidget(self._lbl)
    self.setLayout(self._l)
    self._slider.valueChanged.connect((lambda x: self._lbl.setText(str(self.value()))))

dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py LabeledSlider.__init__/original