You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.3 KiB

import QtQuick
import QtQuick.Controls
Window {
id: fenetre
width: 640
height: 480
visible: true
title: qsTr("Hello World")
Column {
id: green
SpinBox {
id: electron
editable: true
from: echafaud.from
to: echafaud.to
onValueChanged: echafaud.value = value
anchors.horizontalCenter: parent.horizontalCenter
}
Slider {
id: echafaud
width: fenetre.width
from: 0
to: 100
onValueChanged: {
electron.value = value
}
}
}
Item {
anchors.top: green.bottom
anchors.bottom: quit.top
width: parent.width
Rectangle {
id: bob
color: "limegreen"
height: parent.height
width: echafaud.value * fenetre.width / 100
opacity: 0.5
}
Rectangle {
height: bob.height
anchors.left: bob.right
anchors.right: parent.right
color: "red"
opacity: 0.5
}
}
Button {
id: quit
anchors.bottom: parent.bottom
anchors.right: parent.right
text: "&Quit"
onClicked: fenetre.close()
}
}