ReadyDev
import QtQuick
Item {
id: leftItem
width: 370
height: parent.height
anchors.left: parent.left
...
}Item {
id: leftItem
...
Item {
id: dateItem
height: 150
width: parent.width
anchors.top: parent.top
...
}
}Item {
id: leftItem
...
Item {
id: dateItem
...
Text {
id: dateText
text: Qt.formatDate(currentTime, 'yyyy-MM-dd')
font.pixelSize: 16
color: textColor
anchors.top: parent.top
anchors.left: parent.left
anchors.leftMargin: 24
anchors.topMargin: 24
}
}
}Item {
id: leftItem
...
Item {
id: dateItem
...
Text {
id: timeText
text: Qt.formatTime(currentTime, 'hh:mm')
font.pixelSize: 64
color: textColor
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 24
anchors.bottomMargin: 24
}
}
}Item {
id: leftItem
...
Item {
id: dateItem
...
Text {
id: secondText
width: 50
text: ':' + Qt.formatTime(currentTime, 'ss')
font.pixelSize: 24
color: textColor
anchors.baseline: timeText.baseline
anchors.left: timeText.right
}
}
}Item {
id: leftItem
...
Item {
id: dateItem
...
Text {
id: ampmText
text: Qt.formatTime(currentTime, 'AP')
font.pixelSize: 16
color: textColor
anchors.baseline: timeText.baseline
anchors.left: secondText.right
anchors.leftMargin: 8
}
}
}Item {
id: leftItem
...
Item {
id: dateItem
...
Text {
id: dayText
text: Qt.formatDate(currentTime, 'ddd')
font.pixelSize: 16
color: textColor
anchors.top: parent.top
anchors.right: ampmText.right
anchors.topMargin: 24
}
}
}