File tree Expand file tree Collapse file tree 2 files changed +34
-5
lines changed
Expand file tree Collapse file tree 2 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import QtQuick 2.0
66Text {
77 property real t
88 property int frame: 0
9+ color: " red"
10+ text: " ? Hz"
911
1012 Timer {
1113 id: fpsTimer
1416 interval: 1000
1517 running: true
1618 onTriggered: {
17- console . log ( " FPS: " + fpsTimer .fps + " Hz" )
19+ parent . text = " FPS: " + fpsTimer .fps + " Hz"
1820 fps = frame
1921 frame = 0
2022 }
Original file line number Diff line number Diff line change 11import QtQuick 2.0
22
33Item {
4- width: 320
5- height: 480
4+ width: 480
5+ height: 320
66
77 Image {
8+ id: root
89 sourceSize .width : parent .width
910 sourceSize .height : parent .height
10- fillMode: Image .PreserveAspectCrop
11+ // fillMode: Image.PreserveAspectCrop
12+
13+ Component .onCompleted : {
14+ height = parent .height
15+ width = parent .width
16+ }
1117
12- anchors .fill : parent
1318 source: " wallpaper.jpg"
1419
20+ SequentialAnimation {
21+ running: true
22+ loops: Animation .Infinite
23+
24+ NumberAnimation {
25+ target: root
26+ property: " scale"
27+ from: 0.5
28+ to: 4.0
29+ duration: 3000
30+ }
31+
32+ NumberAnimation {
33+ target: root
34+ property: " scale"
35+ from: 4.0
36+ to: 0.5
37+ duration: 1000
38+ }
39+ }
1540 NumberAnimation on rotation {
1641 id: rAnim
1742 from: 0
2247 }
2348
2449 FPSMonitor {
50+ anchors .top : parent .top
51+ anchors .left : parent .left
2552 }
2653}
You can’t perform that action at this time.
0 commit comments