Qt Creator Documentation 2.8.0

Contents

QML VerticalSlider Element

A vertical slider More...

Properties

Detailed Description

The VerticalSlider type provides a slider component that can be styled with an image handle and an image track. The component is used for selecting a value in a given range.

Here is a simple VerticalSlider:

 import QtQuick 1.1
 import "components"

 VerticalSlider {
     id: slider___vertical1
     width: 48
     height: 184
     hintBorderColor: "#000000"
     showHint: true
     maximum: 10
     hintBorderWidth: 2
     hintFontFamily: "Arial"
     hintBackgroundColor: "#ffffff"
     hintFontColor: "#000000"
     hintFontPixelSize: 16
     imageTrack: "images/slider_track.bmp"
     minimum: 0
     value: 0
     handleX: 0
     imageOverlay: ""
     hintRadius: 9
     yMin: 2
     hintWidth: 40
     imageHandle: "images/slider_handle.png"
     allowDrag: true
     hintHeight: 40

     onValueChanged: console.debug(value);
 }

Property Documentation

allowDrag : bool

Determines if the slider handle can be dragged by mouse or by touch.


handleY : int

The y position of the handle in relation to the track image.


height : int

The height of the vertical slider, usually the height of the track image..


hintBackgroundColor : string

The background color of the hint box.


hintBorderColor : string

The border color of the hint box.


hintBorderWidth : string

The border width of the hint box.


hintFontColor : string

The color to use for text of the hint box.


hintFontFamily : string

The font family to use for the text of the hint box.


hintFontPixelSize : string

The pixel size to use for text of the hint box.


hintHeight : int

The height of the hint box.


hintRadius : int

The radius of the hint box. Determines the roundness of the hint box.


hintWidth : int

The width of the hint box.


imageHandle : url

The source image for the slider handle.


imageOverlay : url

The source image for the overlay. This can be left blank in no overlay is needed.


imageTrack : url

The source image for the slider track.


maximum : real

The maximum value for the component.


minimum : real

The minimum value for the component.


showHint : bool

Detrmines if the hint box is shown to inform the user of the current value.


value : real

The current value for the component.


width : int

The width of the vertical slider, usually the width of the track image.


xMin : int

The minimum x position the handle can go to the left.