import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents import QtQuick 2.6 import QtQuick.Controls 2.6 as QQC2 import QtQuick.Layouts 1.15 Item { id: root width: 100 height: 100 property int hours: 0 property int minutes: 0 property int seconds: 0 Timer { interval: 1000 running: true triggeredOnStart: true repeat: true onTriggered: { var time = new Date(); root.hours = time.getHours(); root.minutes = time.getMinutes(); root.seconds = time.getSeconds(); if (root.hours>12) { root.hours = root.hours - 12; } canvas.requestPaint(); } } Canvas { id: canvas anchors.fill: parent onPaint: { var ctx = getContext("2d"); ctx.fillStyle = PlasmaCore.Theme.backgroundColor; ctx.fillRect(0, 0, width, height); var min = width; if (height