代码拉取完成,页面将自动刷新
import QtQuick 2.6
import Boards 1.0
Item {
id: root
visible: true
width: 1200
height: 800
property int value: 0
Behavior on value { SpringAnimation { spring: 5.0; damping: 0.5; epsilon: 0.8 } }
SequentialAnimation {
running: true
loops: Animation.Infinite
NumberAnimation { target: root; property: "value"; duration: 3000; to: 300}
PauseAnimation { duration: 200 }
NumberAnimation { target: root; property: "value"; duration: 3000; to: 0}
PauseAnimation { duration: 200 }
}
Dashboard {
x: 0
y: 0
width: 400
height: 400
startAngle: 240
spanAngle: -300
divisor: 10
precision: 5
minValue: 0
maxValue: 300
value: root.value
}
// Ringboard {
// x: 401
// y: 0
// width: 400
// height: 400
// startAngle: 240
// spanAngle: -root.value
// radiusInner: 130
// radiusOuter: 180
// roundConer: false
// gradient: Ringboard.ConicalGradiant
// }
// Ringboard {
// x: 802
// y: 0
// width: 400
// height: 400
// startAngle: 240
// spanAngle: -root.value
// radiusInner: 130
// radiusOuter: 180
// roundConer: true
// gradient: Ringboard.RadialGradiant
// }
Item {
id: fpsItem
property int fps: 0
property int frameCount: 0
NumberAnimation on rotation {
from: 0
to: 100
loops: Animation.Infinite
duration: 300
}
onRotationChanged: frameCount++
}
Text {
x: 10
y: 10
text: "FPS: " + fpsItem.fps
color: "green"
font.pixelSize: 18
}
Timer {
interval: 1000
repeat: true
running: true
onTriggered: {
fpsItem.fps = fpsItem.frameCount;
fpsItem.frameCount = 0;
console.log("FPS:", fpsItem.fps)
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。