Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Slider component example using Qt Quick

From Wiki
Jump to: navigation, search

This article explains how to use the QML slider with start and stop Button. The example uses a timer to run the slider and buttons are used to start and stop the slider.

Article Metadata
Code Example
Installation file: N/A
Tested with
SDK: Qt SDK 1.1.4
Devices(s): Emulator
Platform(s): Symbian and Meego
Device(s): Symbian device with Qt and Meego
Dependencies: None
Platform Security
Signing Required: Selfsign
Capabilities: None
Keywords: Slider
Created: kkrish (23 Feb 2012)
Last edited: hamishwillee (30 May 2013)

Code snippets

    Slider {
id: slider
maximumValue: 30
minimumValue: 0
stepSize: 1
value: 1
valueIndicatorVisible: true
anchors.centerIn: parent
id: slidTimer
interval: 1000
running: false
repeat: true
onTriggered: {
console.log("slider.value : " + slider.value )
slider.value = slider.value + 1
id: startBtn
anchors.horizontalCenter: parent.horizontalCenter
text: "Start"
onClicked: {
if(startBtn.text == "Start"){
startBtn.text = "Stop"
startBtn.text = "Start"
This page was last modified on 30 May 2013, at 06:39.
64 page views in the last 30 days.