Files
qt6-qml-for-beginners/Qt6QMLBeginnersCode/8-QtQuickControls/14-Slider/Main.qml
2025-09-28 17:05:51 +08:00

39 lines
753 B
QML

// Copyright (c) Daniel Gakwaya.
// SPDX-License-Identifier: MIT
import QtQuick
import QtQuick.Controls
Window {
visible: true
width: 640
height: 480
title: qsTr("Slider")
Column {
width: parent.width
spacing: 20
Slider {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
from: 1
to: 100
value: 40
onValueChanged: {
progressBarId.value = value
}
}
ProgressBar {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
id: progressBarId
from : 1
to: 100
value: 40
}
}
}