39 lines
736 B
QML
39 lines
736 B
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
Rectangle {
|
|
width: parent.width
|
|
height: width
|
|
border.color: "black"
|
|
border.width: 1
|
|
radius: 5
|
|
// color: "green"
|
|
|
|
Item {
|
|
width: parent.width
|
|
height: text.height * 2
|
|
|
|
anchors.centerIn: parent
|
|
|
|
Text {
|
|
id: text
|
|
anchors.centerIn: parent
|
|
property var date: Date()
|
|
|
|
text: Qt.formatDateTime(date, "hh\nmm")
|
|
|
|
font.family: "Iosevka NF"
|
|
font.weight: Font.ExtraBold
|
|
font.pointSize: 18
|
|
|
|
color: "black"
|
|
}
|
|
}
|
|
|
|
Timer {
|
|
interval: 1000 * 60
|
|
running: true
|
|
repeat: true
|
|
onTriggered: text.date = new Date()
|
|
}
|
|
}
|