edifice.Slider¶
-
class
edifice.
Slider
(value=0.0, min_value=0, max_value=1, dtype=<class 'float'>, orientation='horizontal', on_change=<function Slider.<lambda>>, **kwargs)[source]¶ Bases:
edifice.base_components.QtWidgetComponent
Slider bar widget.
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 initial value of the widget, and it could either be an integer or a float When the user changes the value of the slider, the on_change callback is called with the new value.
- Parameters
value (
Union
[float
,int
]) – the initial value of the slidermin_value (
Union
[float
,int
]) – the minimum value for the slidermax_value (
Union
[float
,int
]) – the max value for the sliderdtype – the data type for the slider, either int or float.
orientation – the orientation of the slider, either horizontal or vertical.
on_change (
Callable
[[Union
[float
,int
]],None
]) – callback for when the slider value changes. The callback receives the new value of the slider as an argument.
Methods
set_on_change
(on_change)Attributes
children
The children of this component.
props
The props of this component.