aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery/pages/SliderPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/gallery/pages/SliderPage.qml')
-rw-r--r--examples/quickcontrols2/gallery/pages/SliderPage.qml17
1 files changed, 12 insertions, 5 deletions
diff --git a/examples/quickcontrols2/gallery/pages/SliderPage.qml b/examples/quickcontrols2/gallery/pages/SliderPage.qml
index 550ccec9..d9853c22 100644
--- a/examples/quickcontrols2/gallery/pages/SliderPage.qml
+++ b/examples/quickcontrols2/gallery/pages/SliderPage.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
@@ -63,5 +63,12 @@ Pane {
width: itemWidth
anchors.horizontalCenter: parent.horizontalCenter
}
+
+ Slider {
+ orientation: Qt.Vertical
+ value: 0.5
+ height: itemWidth
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
}
}