Skip to content

QDoubleSlider

A QSlider for float values. Its range, value, and steps are floats (the default single step is 0.01, and the default page step is 0.1).

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

from superqt import QDoubleSlider

app = QApplication([])

slider = QDoubleSlider(Qt.Orientation.Horizontal)
slider.setRange(0, 1)
slider.setValue(0.5)
slider.show()

app.exec()

QDoubleSlider

QDoubleSlider(*args, **kwargs)

Subclass of QSlider

QDoubleSlider inherits all of QSlider's methods, signals, and properties. Only those that superqt adds or changes are listed here.

Signals

  • fvalueChanged(float)
  • fsliderMoved(float)
  • frangeChanged(float, float)

Methods

applyMacStylePatch

applyMacStylePatch() -> None

Apply a QSS patch to fix sliders on macos>=12 with QT < 6.

see FAQ for more details.

invertedAppearance

invertedAppearance() -> bool

maximum

maximum() -> float

minimum

minimum() -> float

pageStep

pageStep() -> float

setInvertedAppearance

setInvertedAppearance(inverted: bool) -> None

setMaximum

setMaximum(max: float) -> None

setMinimum

setMinimum(min: float) -> None

setPageStep

setPageStep(step: float) -> None

setRange

setRange(min: float, max_: float) -> None

setSingleStep

setSingleStep(step: float) -> None

setSliderPosition

setSliderPosition(pos: _T) -> None

setTickInterval

setTickInterval(ts: float) -> None

setValue

setValue(value: _T) -> None

singleStep

singleStep() -> float

sliderPosition

sliderPosition() -> _T

tickInterval

tickInterval() -> float

triggerAction

triggerAction(action: SliderAction) -> None

value

value() -> _T