aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/gallery/pages/RangeSliderPage.qml')
-rw-r--r--examples/quickcontrols2/gallery/pages/RangeSliderPage.qml18
1 files changed, 13 insertions, 5 deletions
diff --git a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml
index c41097df..62cbeb88 100644
--- a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml
+++ b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml
@@ -39,16 +39,16 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
-Pane {
- id: pane
+ScrollablePage {
+ id: page
- readonly property int itemWidth: Math.max(slider.implicitWidth, Math.min(slider.implicitWidth * 2, pane.availableWidth / 3))
+ readonly property int itemWidth: Math.max(slider.implicitWidth, Math.min(slider.implicitWidth * 2, page.availableWidth / 3))
Column {
spacing: 40
- anchors.fill: parent
+ width: parent.width
Label {
width: parent.width
@@ -64,5 +64,13 @@ Pane {
width: itemWidth
anchors.horizontalCenter: parent.horizontalCenter
}
+
+ RangeSlider {
+ orientation: Qt.Vertical
+ first.value: 0.25
+ second.value: 0.75
+ height: itemWidth
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
}
}