Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Detailed Description

Slider QML Type

A horizontal slider More...

Import Statement: import Sailfish.Silica 1.0
  • List of all members, including inherited members

Properties

  • animateValue : bool
  • down : bool
  • enabled : bool
  • handleVisible : bool
  • highlighted : bool
  • label : string
  • maximumValue : real
  • minimumValue : real
  • sliderValue : real
  • stepSize : real
  • value : real
  • valueText : string

Detailed Description

The Slider type provides a horizontal slider.

A slider enables the user to drag a handle along a line to select a particular value within a specific range of values.

Here is a simple slider:

 import Sailfish.Silica 1.0

 Slider {
     width: parent.width
     minimumValue: 100
     maximumValue: 200
     value: 150
 }

The Slider may be used to indicate progress by setting the enabled property to false to prevent user input.

Slider inherits the QtQuick MouseArea type, so any properties, signals and methods of MouseArea are also available to Slider objects. See the MouseArea documentation for its full list of available properties, signals and methods.

Property Documentation

animateValue : bool

Set animateValue to false when you don't want the slider to animate the value changes.


down : bool

This property is true when the slider is pressed.


enabled : bool

If true (default) user can interact with the Slider by touching or dragging on the Slider.

If false, the user cannot interact with the Slider. This is useful for sliders that only indicate progress and should not be interactive.


handleVisible : bool

Displays a handle at the current value if true (default); otherwise no handle will be displayed and only the highlighted slider bar will be shown.


highlighted : bool

This property determines whether the slider is shown highlighted. By default it is bound to down.


label : string

The label to display under the slider. This text usually describes the function of the Slider.

See also valueText.


maximumValue : real

The maximum value of of the slider (default: 1.0).


minimumValue : real

The minimum value of of the slider (default: 0.0)


[read-only] sliderValue : real

The current value of the slider displayed in the bar, i.e. bounded by the minimum and maximum values.

See also value.


stepSize : real

The increment by which the value may be incremented/decremented. A stepSize of 0 (the default) will allow the value to be adjusted freely.

The stepSize increments are relative to the minimumValue, e.g. a stepSize of 0.5 and a minimumValue of 0.25 results in a valid sequence of 0.25, 0.75, 1.25, ...

Note this only restricts the values set by dragging the visual handle; it does not restrict the values set through the value property.


value : real

The current value of of the slider.

It is possible to set the value outside the bounds; however, the sliderValue will always be set to a valid value.

See also sliderValue.


valueText : string

Holds to text to display above the current value. This text usually represents the value of the Slider.

 import Sailfish.Silica 1.0

 Slider {
     minimumValue: 100
     maximumValue: 200
     value: 150
     valueText: "$" + value
 }

See also label.


  • Legal
  • Contact Us
  • Jollyboys Ltd © 2024

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn