Slider QML Type
A styled slider with a Fluent Design handle. More...
| Import Statement: | import FluentUI 1.0 |
Properties
- accentColor : var
- enabled : bool
- from : real
- horizontal : bool
- live : bool
- position : real
- snapMode : enumeration
- stepSize : real
- to : real
- value : real
- visualPosition : real
Signals
- moved()
Detailed Description
Slider allows the user to select a value from a continuous or discrete range by dragging a handle along a track. It supports step-based snapping and live value updates.
Property Documentation
accentColor : var
The accent color used for the slider handle and the filled portion of the track. Can be a color, string, or Qt.rgba value.
enabled : bool
Whether the slider can be interacted with. When false, the control appears disabled and does not accept user input.
from : real
The starting value of the slider range. Defaults to 0.0.
horizontal : bool
Whether the slider is oriented horizontally. When false, the slider is oriented vertically.
live : bool
When set to true (the default), the value property updates continuously as the user drags the handle. When false, the value only updates when the user releases the handle.
position : real
The logical position of the slider handle, computed from value relative to from and to. Ranges from 0.0 to 1.0.
snapMode : enumeration
Controls the snap behavior of the slider. When set to Slider.SnapOnRelease, the handle snaps to the nearest step when released.
stepSize : real
The step increment between valid values. When set to a non-zero value, the slider snaps to multiples of stepSize. Defaults to 0.0.
to : real
The ending value of the slider range. Defaults to 1.0.
value : real
The current value of the slider, constrained between from and to.
visualPosition : real
The visual position of the slider handle, accounting for layout direction. Mirrored for right-to-left layouts.
Signal Documentation
moved()
Emitted when the slider handle has been moved by the user.
Note: The corresponding handler is onMoved.