blob: 65afb0b780424a661e5e79d1f02b2734dde69b25 (
plain)
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
|
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.0
Item {
id: dateAndTime
width: 53 * hspan
height: 33 * vspan
property int hspan: 4
property int vspan: 1
property var currentDate: new Date();
RowLayout {
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
CustomLabel {
font.capitalization: Font.AllUppercase
text: Qt.formatDateTime(dateAndTime.currentDate, "HH:mm")
color: "#000000"
}
}
Timer {
interval: 60000
running: true
repeat: true
onTriggered: {
dateAndTime.currentDate = new Date();
}
}
}
|