-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEaster_egg.qml
45 lines (39 loc) · 1.31 KB
/
Easter_egg.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import FluentUI 1.0
import "../component"
FluScrollablePage {
FluFrame {
Layout.fillWidth: true
Layout.preferredHeight: 1000
padding: 10
Column {
spacing: 50
width: parent.width
height: parent.height
anchors.centerIn: parent
FluImage {
id: image
height: parent.height
width: image.preserveAspectRatio ? image.height * image.aspectRatio : parent.width
fillMode: Image.PreserveAspectFit
source: "https://xialiu.cn/api/dan/"
onStatusChanged: {
if (status === Image.Error) {
showError(qsTr("The image failed to load, please reload"))
}
}
clickErrorListener: function() {
source = "https://edui123.com/rili/"
}
onSourceSizeChanged: {
if (sourceSize.width > 0 && sourceSize.height > 0) {
aspectRatio = sourceSize.width / sourceSize.height
}
}
}
}
}
}