diff options
author | Topi Reinio <topi.reinio@digia.com> | 2013-01-21 15:53:47 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-21 16:19:33 +0100 |
commit | 0111e8b35341f363f6728f89f92232e86f3de3c5 (patch) | |
tree | 1f8a47708f3ac8243d1979fc4fa117099ec3948a /examples/quick/accessibility/content/Slider.qml | |
parent | 9e604dcd07d5b943520ab2a3d472bd23fdd577ec (diff) |
Clean up accessibility QtQuick example
Remove an undefined value (column.h) used in the accessibility
example and fix minor indentation and style issues.
Task-number: QTBUG-29225
Change-Id: I118ca7ee4fd24a3e94eb9b39e60514314ddcd7f0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'examples/quick/accessibility/content/Slider.qml')
-rw-r--r-- | examples/quick/accessibility/content/Slider.qml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/quick/accessibility/content/Slider.qml b/examples/quick/accessibility/content/Slider.qml index 314c7af798..c6eaca30a2 100644 --- a/examples/quick/accessibility/content/Slider.qml +++ b/examples/quick/accessibility/content/Slider.qml @@ -39,7 +39,6 @@ ** ****************************************************************************/ - import QtQuick 2.0 // Minimal slider implementation @@ -49,10 +48,10 @@ Rectangle { property alias text: buttonText.text Accessible.role: Accessible.Slider - property int value : 5 // required - property int minimumValue : 0 // optional (default INT_MIN) - property int maximumValue : 20 // optional (default INT_MAX) - property int stepSize : 1 // optional (default 1) + property int value: 5 // required + property int minimumValue: 0 // optional (default INT_MIN) + property int maximumValue: 20 // optional (default INT_MAX) + property int stepSize: 1 // optional (default 1) width: 100 height: 30 @@ -77,6 +76,7 @@ Rectangle { anchors.centerIn: parent font.pixelSize: parent.height * .5 } + MouseArea { anchors.fill: parent onClicked: { @@ -84,6 +84,7 @@ Rectangle { slider.value = pos } } + Keys.onLeftPressed: value > minimumValue ? value = value - stepSize : minimumValue Keys.onRightPressed: value < maximumValue ? value = value + stepSize : maximumValue } |