C
Slider QML Type
Used to select a value by sliding a handle along a track. More...
| Import Statement: |  import QtQuick.Controls | 
| Since: | Qt Quick Ultralite 1.0 | 
| Inherits: | 
- List of all members, including inherited members
 - Slider is part of Input Controls.
 
Properties
- from : real
 - handle : Item
 - horizontal : bool
 - orientation : enumeration
 - position : real
 - pressed : bool
 - stepSize : real
 - to : real
 - value : real
 - vertical : bool
 - visualPosition : real
 
Signals
- moved()
 
Methods
- real valueAt(real position)
 
Detailed Description
Slider is used to select a value by sliding a handle along a track.
In the example below, custom from, value, and to values are set:
Slider { from: 1 value: 25 to: 100 }
The position property is expressed as a fraction of the control's size, in the range 0.0 - 1.0. The visualPosition is useful for positioning the handle when styling Slider.
See also Controls Styling and Input Controls.
Property Documentation
from : real  | 
handle : Item  | 
This property holds the handle item.
See also Controls Styling.
horizontal : bool   | 
This property holds whether the slider is horizontal.
See also orientation.
orientation : enumeration  | 
This property holds the orientation.
Possible values:
| Constant | Description | 
|---|---|
Qt.Horizontal | Horizontal (default) | 
Qt.Vertical | Vertical | 
See also horizontal and vertical.
position : real   | 
This property holds the logical position of the handle.
The position is expressed as a fraction of the control's size, in the range 0.0 - 1.0.
See also value, visualPosition, and valueAt().
pressed : bool  | 
This property holds whether the slider is pressed by either touch, mouse, or keys.
stepSize : real  | 
This property holds the step size. The default value is 0.0.
to : real  | 
value : real  | 
This property holds the value in the range from - to. The default value is 0.0.
See also position.
vertical : bool   | 
This property holds whether the slider is vertical.
See also orientation.
visualPosition : real   | 
This property holds the visual position of the handle.
See also position.
Signal Documentation
moved()  | 
This signal is emitted when the slider has been interactively moved by the user.
Note: The corresponding handler is onMoved.
Method Documentation
Available under certain Qt licenses.
Find out more.