MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QML Slider Element

Component for selecting a value in a given range. More...

Inherits SliderTemplate

This element was introduced in qt-components 4.7.

Properties

Methods

Detailed Description

 Slider {
     id:mySlider
     stepSize:1
     valueIndicatorVisible: true
     minimumValue:0
     maximumValue:100
     width:200
 }

Property Documentation

inverted : bool

If true the minimum position starts from the right (horizontal), bottom (vertical)


maximumValue : real

Maximum value that is choosed with the slider.


minimumValue : real

Minimum value that is choosed with the slider.


orientation : int

Orientation of the component: Qt.Vertical or Qt.Horizontal


platformStyle : QtObject

Platform specific property for styling the component.

See also SliderStyle.


pressed : bool

This property is true during the sliding.


stepSize : real

Distance between two selectable values.


value : real

Current value of the slider. This property is always updated when pressed is false. Can be also updated live during the sliding.


valueIndicatorMargin : int

Property default is 1

Distance of the value indicator from the slider.


valueIndicatorPosition : string

Position of the value indicator. Possible values:

  • In orizzontal - "Left" or "Right" (default "Left")
  • In vertical - "Top" or "Bottom" (default "Top")

valueIndicatorText : string

Text that is displayed by the value indicator.


valueIndicatorVisible : bool

Property default is true

Toggles the visibility of the value indicator.


Method Documentation

Slider::formatValue ( v )

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 int value.