Slider QML Type
A slider control. More...
Import Statement: | import Qt.labs.controls 1.0 |
Inherits: |
Properties
- from : real
- handle : Item
- orientation : enumeration
- position : real
- pressed : bool
- snapMode : enumeration
- stepSize : real
- to : real
- track : Item
- value : real
- visualPosition : real
Methods
Detailed Description
Slider is used to select a value by sliding a handle along a track.
A slider in its normal state. | |
A slider that has active focus. | |
A slider that is disabled. |
Slider {
value: 0.5
}
Note: Types in the Qt.labs module are not guaranteed to remain compatible in future versions.
See also Customizing Slider and Input Controls.
Property Documentation
This property holds the handle item.
See also Customizing Slider.
This property holds the orientation.
Possible values:
Constant | Description |
---|---|
Qt.Horizontal | Horizontal (default) |
Qt.Vertical | Vertical |
This property holds the logical position of the handle.
The position is defined as a percentage of the control's size, scaled to 0.0 - 1.0
. Unlike the value property, the position
is continuously updated while the handle is dragged. For visualizing a slider, the right-to-left aware visualPosition should be used instead.
See also value and visualPosition.
This property holds the snap mode.
Possible values:
Constant | Description |
---|---|
Slider.NoSnap | The slider does not snap (default). |
Slider.SnapAlways | The slider snaps while the handle is dragged. |
Slider.SnapOnRelease | The slider does not snap while being dragged, but only after the handle is released. |
See also stepSize.
This property holds the step size. The default value is 0.0
.
See also snapMode, increase(), and decrease().
This property holds the track item.
See also Customizing Slider.
This property holds the visual position of the handle.
The position is defined as a percentage of the control's size, scaled to 0.0 - 1.0
. When the control is mirrored, the value is equal to 1.0 - position
. This makes the value suitable for visualizing the slider, taking right-to-left support into account.
See also position.