edifice.Slider#
- class edifice.Slider(value, min_value=0, max_value=100, orientation=<Orientation.Horizontal: 1>, on_change=None, *, enable_mouse_scroll=True, **kwargs)[source]#
Bases:
QtWidgetElement
[QSlider
]Slider bar widget.
Underlying Qt Widget QSlider
A Slider bar allows the user to input a continuous value. The bar could be displayed either horizontally or vertically.
The value prop determines the position of the slider. When the user changes the position of the slider, the on_change callback is called with the new value.
- Parameters:
value (
int
) – The value of the slider.min_value (
int
) – The minimum value for the slider.max_value (
int
) – The maximum value for the slider.orientation (
Orientation
) – The orientation of the slider, eitherHorizontal
orVertical
. See Orientation.on_change (
Optional
[Callable
[[int
],Optional
[Awaitable
[None
]]]]) – Event handler for when the value of the slider changes, but only when the slider is being move by the user, not when the value prop changes.enable_mouse_scroll (
bool
) – Whether mouse scroll events should be able to change the value.
Methods
__init__
(value[, min_value, max_value, ...])register_ref
(reference)Registers provided
Reference
to this Element.set_key
(key)Set the key of an
Element
.Attributes
children
The children of this Element.
props
The props of this Element.
underlying
The underlying QWidget, which may not exist if this Element has not rendered.