Slider

Slider is a component to select a value from a continuous range of values. More...

Properties

Signals

Methods

Detailed Description

The slider's sensing area is defined by the width and height, therefore delegates should take this into account when defining the visuals, and alter these values to align the graphics' sizes.

Example:

Item {
    Slider {
        function formatValue(v) { return v.toFixed(2) }
        minimumValue: -3.14
        maximumValue: 3.14
        value: 0.0
        live: true
    }
}

Theming

The slider's default style class is slider and style properties depend on the actual delegate defined by the theme, except of one property which defines the spacing units between the slider's bar and thumb, called thumbSpacing. The slider uses one single touch sensing area to position the thumb within the bar. Therefore However delegates must define the following properties:

Beside these, the library provies functions for delegates to update liveValue and normalizedValue in SliderUtils module.

This component is under heavy development.

Property Documentation

live : bool

This documentation is under development and is subject to change.

Defines whether the value is updated while the thumb is dragged or just when the thumb is released.


maximumValue : real

This documentation is under development and is subject to change.

The maximum value from the continuous range of values. If this value is lesser than minimumValue, the component will be in an inconsistent state.


minimumValue : real

This documentation is under development and is subject to change.

The minimum value from the continuous range of values. If this value is greater than maximumValue, the component will be in an inconsistent state.


value : real

This documentation is under development and is subject to change.

The current value of the slider. This property is not changed while the thumb is dragged unless the live property is set to true.


Signal Documentation

Slider::touched(bool onThumb)

This documentation is under development and is subject to change.

The signal is emitted when there is a click on the slider. The onThumb parameter provides information if the click, was inside of the thumb element.


Method Documentation

Slider::formatValue( v)

This documentation is under development and is subject to change.

This function is used by the value indicator to show the current value. Reimplement this function if you want to show different information. By default, the value v is rounded to the nearest interger value.

Note: this function will be deprecated, and will be solved with particular delegates for the thumb.