Pages
API Documentation
On this page

FormSliderDelegate QML Type

A form delegate for selecting a value with a slider. More...

Detailed Description

Use valueText to show a formatted value beside the label. Handle moved to react only to changes made by the user.

FormCard.FormSliderDelegate {
    id: transparencyDelegate
    label: i18n("Past event transparency")
    from: 0
    to: 1
    stepSize: 0.05
    value: Config.pastEventsTransparencyLevel
    valueText: i18n("%1%", Math.round(value * 100))
    onMoved: Config.pastEventsTransparencyLevel = value
}

Property Documentation

[default: ""] description : string

Secondary text shown below the slider.

from : real

The minimum value of the slider.

[required] label : string

The label shown above the slider.

[default: null] leading : Item

An item shown before the slider, such as an icon.

stepSize : real

The step size of the slider.

to : real

The maximum value of the slider.

[default: null] trailing : Item

An item shown after the slider, such as an icon.

value : real

The value of the slider.

[default: ""] valueText : string

Optional text shown beside the label, such as a formatted value.

Signal Documentation

moved()

Emitted when the user moves the slider with a mouse, touch, or keyboard.

Note: The corresponding handler is onMoved.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.