6 Star 19 Fork 24

韦东山 / Qtmxapp-desktop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
TitleRightBar.qml 3.58 KB
一键复制 编辑 原始数据 按行查看 历史
世玉轩 提交于 2020-06-19 09:31 . init push myir hmi v2.0 gui
import QtQuick 2.0
Rectangle {
id:root
anchors{
right: parent.right
rightMargin: 5
top: parent.top
topMargin: 5
}
property real icongap: 16
// FontLoader { id: localFont; source: "fonts/DIGITAL/DS-DIGIB.TTF" }
// HomeButton{
// id: logo
// label.visible: false
// clickable: true
// source: "images/wvga/home/header_logo.png"
// onClicked: {
// popupFrame1.open()
// }
// }
HomeButton{
id: btIcon
label.visible: false
clickable: false
source: "images/wvga/home/bt.png"
// width: 12
// height: 12
anchors{
right: ethIcon.left
rightMargin: icongap
top: parent.top
topMargin: 10
// verticalCenter: parent.verticalCenter
}
}
HomeButton{
id: ethIcon
label.visible: false
clickable: false
source: "images/wvga/home/eth.png"
anchors{
right: wifiIcon.left
rightMargin: icongap
top: parent.top
topMargin: 10
// verticalCenter: parent.verticalCenter
}
}
HomeButton{
id: wifiIcon
// anchors.margins: 5
label.visible: false
// height: 24
clickable: false
source: "images/wvga/home/wifi.png"
anchors{
right:mobiIcon.left
rightMargin: icongap
top: parent.top
topMargin: 10
// verticalCenter: parent.verticalCenter
}
}
HomeButton{
id: mobiIcon
// anchors.margins: 5
label.visible: false
// height: 24
clickable: false
source: "images/wvga/home/mobile.png"
anchors{
right:tt.left
rightMargin: icongap
top: parent.top
topMargin: 10
// verticalCenter: parent.verticalCenter
}
}
Rectangle{
id:tt
color:"green"
width: 80
anchors.right: parent.right
// anchors.rightMargin: 20
// anchors.topMargin: 5
Text {
id: time
anchors.leftMargin: icongap
anchors.horizontalCenter: parent.horizontalCenter
font{
family:"DS-Digital"
pixelSize:14
}
// FontLoader { id: localFont; source: "qrc:/fonts/DIGITAL/DS-DIGIB.TTF" }
text: "00:00:00";color: "white";// style: Text.Outline;
}
Text {
id: date
anchors.top:time.bottom
anchors.leftMargin: icongap
anchors.horizontalCenter: parent.horizontalCenter
// font.pointSize:8; text: qsTr("2020年2月25日");style: Text.Outline;styleColor: "white"
// FontLoader { id: localFont1; source: "qrc:/fonts/DIGITAL/DS-DIGIB.TTF" }
font{
family: "DS-Digital"
pixelSize:10
}
// style: Text.Outline;
// text: qsTr("2020年2月25日")
color: "white"
}
}
Timer{
id:timer
interval:100;running:true;repeat: true
onTriggered: {
var currentTime = new Date();
time.text = Qt.formatTime(currentTime,"hh:mm:ss");
date.text = Qt.formatDate(currentTime,"yyyy-MM-dd");
}
}
Component.onCompleted: {
timer.start();
}
}
C++
1
https://gitee.com/weidongshan/Qtmxapp-desktop.git
git@gitee.com:weidongshan/Qtmxapp-desktop.git
weidongshan
Qtmxapp-desktop
Qtmxapp-desktop
master

搜索帮助