Skip to content

QLabeledSlider#

QSlider variant that shows an editable (SpinBox) label next to the slider.

from qtpy.QtCore import Qt
from qtpy.QtWidgets import QApplication

from superqt import QLabeledSlider

app = QApplication([])

slider = QLabeledSlider(Qt.Orientation.Horizontal)
slider.setValue(42)
slider.show()

app.exec_()

QLabeledSlider

Qt Class#

QAbstractSlider

Signals#

editingFinished#

Enums#

QLabeledSlider.EdgeLabelMode#

  • LabelIsRange

  • LabelIsValue

Methods#

edgeLabelMode() -> EdgeLabelMode #

Return current EdgeLabelMode.

setEdgeLabelMode(opt: EdgeLabelMode) -> None #

Set the EdgeLabelMode.

Parameters:

Name Type Description Default
opt EdgeLabelMode

To show no label, use EdgeLabelMode.NoLabel. To show the value of the slider, use EdgeLabelMode.LabelIsValue. To show value / maximum, use EdgeLabelMode.LabelIsValue | EdgeLabelMode.LabelIsRange.

required