def __init__(self, min, max, default=None, parent=None):
        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)

        # setup layout
        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)

        # connect signals
        self._slider.valueChanged.connect(lambda x: self._lbl.setText(str(self.value())))
Test removing ASNs from NIPAP.
dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py/LabeledSlider.__init__--crossover with--dataset/ETHPy150Open SpriteLink/NIPAP/tests/nipapbase.py/NipapTest.test_remove_asn