initial commit
This commit is contained in:
commit
35524b5e6e
7 changed files with 412 additions and 0 deletions
39
ClockWidget.qml
Normal file
39
ClockWidget.qml
Normal file
|
@ -0,0 +1,39 @@
|
|||
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()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue