Qt_Performance_Benchmark/Qt_Performance_Benchmark/Rect.qml

21 lines
496 B
QML

import QtQuick 2.0
Rectangle {
function randomInteger(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
width:100
height:100
color:Qt.rgba(Math.random(),Math.random(),Math.random(),1);
NumberAnimation on x {loops: Animation.Infinite; from: randomInteger(0, 1920); to: randomInteger(0, 1920); duration: 500 }
NumberAnimation on y {loops: Animation.Infinite; from: randomInteger(0, 900); to: randomInteger(0, 900); duration: 500 }
}