Qt_Performance_Benchmark/Qt_Performance_Benchmark/main.qml

71 lines
1.3 KiB
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: 100; duration: 500 }
}
Rectangle {
x: 20
y: 148
width: 100; height: 100
color: "blue"
//NumberAnimation on x { id: ani; loops: Animation.Infinite; to: 250; duration: 1000 }
NumberAnimation on x { id: ani2; loops: Animation.Infinite; from: 0; to: 1000; duration: 5000 }
}
function onChecked(checked) {
if (checked) {
ani.resume()
} else {
ani.pause()
}
}
CheckBox {
id: checkBox
x: 41
y: 279
state: active
text: qsTr("Check Box")
onClicked: rootwin.onChecked(checked)
}
FpsItem {
id: fpsItem
anchors.verticalCenterOffset: 106
anchors.horizontalCenterOffset: -239
anchors.centerIn: parent
}
}
/*##^##
Designer {
D{i:0;formeditorZoom:2}
}
##^##*/