qmlmirror/Clock.qml
Oscar Andreasson 15dec86c32 Adding MPL 2.0 licenses to all new files
Added Main.qml
Fixed Transport.qml a bit
Some other minor work
2015-07-01 21:12:33 -07:00

52 lines
1.3 KiB
QML

/*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) 2015 Oscar Andreasson
*/
import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.1
import QtQuick.Window 2.0
Rectangle {
// title: qsTr("Hello World")
width: 480
height: 200
color: "#000000"
property date currDate: new Date()
Timer {
interval: 500; running: true; repeat: true
onTriggered: {
currDate = new Date()
time.text = currDate.toTimeString()
datum.text = currDate.toDateString()
}
}
ColumnLayout {
id: layout
anchors.fill: parent
Text {
id: time
// anchors.top: parent.top
font.pointSize: 48
font.family: "Helvetica"
color: "#ffffff"
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
id: datum
// anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: 24
color: "#ffffff"
font.family: "Helvetica"
}
}
}