Qt_Performance_Benchmark/Qt_Performance_Benchmark/main.qml

52 lines
890 B
QML

import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.3
Window {
id: rootwin
width: 640
height: 480
visible: true
title: qsTr("Hello World")
Rectangle {
x: 20
y: 20
width: 100; height: 100
color: "forestgreen"
//NumberAnimation on x { id: ani; loops: Animation.Infinite; to: 250; duration: 1000 }
NumberAnimation on x { id: ani; loops: Animation.Infinite; from: 0; to: 1000; duration: 5000 }
}
function onChecked(checked) {
if (checked) {
ani.resume()
} else {
ani.pause()
}
}
CheckBox {
id: checkBox
x: 78
y: 200
state: active
text: qsTr("Check Box")
onClicked: rootwin.onChecked(checked)
}
}
/*##^##
Designer {
D{i:0;formeditorZoom:2}
}
##^##*/