QLabeledRangeSlider#
Labeled variant of QRangeSlider. (see that page for more details).
from qtpy.QtCore import Qt
from qtpy.QtWidgets import QApplication
from superqt import QLabeledRangeSlider
app = QApplication([])
slider = QLabeledRangeSlider(Qt.Orientation.Horizontal)
slider.setValue((20, 80))
slider.show()
app.exec_()

Qt Class#
Signals#
valuesChanged#
editingFinished#
Enums#
QLabeledRangeSlider.LabelPosition#
-
NoLabel -
LabelsAbove -
LabelsBelow -
LabelsOnHandle
QLabeledRangeSlider.EdgeLabelMode#
-
LabelIsRange -
LabelIsValue
Methods#
barColor = Property(QtGui.QBrush, _getBarColor, _setBarColor)
class-attribute
instance-attribute
#
The color of the bar between the first and last handle.
edgeLabelMode() -> EdgeLabelMode
#
Return current EdgeLabelMode.
handleLabelPosition() -> LabelPosition
#
Return where/whether labels are shown adjacent to slider handles.
setEdgeLabelMode(opt: EdgeLabelMode) -> None
#
Set EdgeLabelMode, controls what is shown at the min/max labels.
setHandleLabelPosition(opt: LabelPosition) -> None
#
Set where/whether labels are shown adjacent to slider handles.
If you find that you need to fine tune the position of the handle labels:
QLabeledRangeSlider.label_shift_x: adjust horizontal label positionQLabeledRangeSlider.label_shift_y: adjust vertical label position