ESP32_upper/QML/components/HomePageConnectStateInfo.qml

58 lines
1.5 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts
import QtQuick.Controls
import ESP32_upper
Item {
anchors.fill: parent
Rectangle{
id: id_home_page_csi_root
height: parent.height
width: parent.width
RowLayout {
spacing : 2
height: parent.height
width: parent.width
Text {
Layout.preferredWidth: 100
text: "连接状态:"
font.pixelSize: id_gp.font_info_pixel_size
}
Text {
Layout.preferredWidth: 100
id: id_text_home_page_connet_state
text: "未连接"
font.pixelSize: id_gp.font_info_pixel_size
}
Rectangle {
Layout.fillWidth: true
opacity: 0
}
Button {
Layout.preferredWidth: 100
text: "重新连接"
hoverEnabled: false
font.pixelSize: id_gp.font_info_pixel_size
background: Rectangle { // 自定义背景
color: control.pressed ? "lightblue" : "blue"
border.color: "black"
radius: 10
}
onClicked: {
console.log("press butn")
}
}
Rectangle {
Layout.preferredWidth: 10
opacity: 0
}
}
}
}