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#
editingFinished
#
Enums#
QLabeledRangeSlider.EdgeLabelMode
#
-
LabelIsRange
-
LabelIsValue
QLabeledRangeSlider.LabelPosition
#
-
NoLabel
-
LabelsAbove
-
LabelsBelow
Methods#
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