import QtQuick 2.14 import QtQuick.Window 2.14 import QtQuick.Controls 2.14 import QtQuick.Layouts 1.12 Rectangle { objectName: "main" id: root width: 1440 height: 900 visible: true Flow{ anchors.fill: parent width: parent.width height: parent.height Rectangle { width: 80; height: parent.height color: "black" Flow{ id: element flow:Flow.TopToBottom //从上到下排列 width: parent.width height: parent.height Button{ id: btn_serial width: parent.width height:60 anchors.top: parent.top onClicked: { uart_choose.visible = true net_choose.visible = false proto_debug.visible = false } background: Image { anchors.fill: parent source: "qrc:///res/serial.svg" } } Text { id: label_serial text: qsTr("串口设置") width: parent.width color: "white" font.pointSize: 10 anchors.top: btn_serial.bottom } Button{ id: button_net width: parent.width height:60 anchors.top: label_serial.bottom onClicked: { } background: Image { anchors.fill: parent source: "qrc:///res/net.svg" } onPressed:{ uart_choose.visible = false net_choose.visible = true proto_debug.visible = false } } Text { id: label_net text: qsTr("网口设置") width: parent.width color: "white" font.pointSize: 10 anchors.top: button_net.bottom } Button{ id: button_proto width: parent.width height:60 anchors.top: label_net.bottom onClicked: { uart_choose.visible = false net_choose.visible = false proto_debug.visible = true DataWrap.getValFromQml(1) } background: Image { anchors.fill: parent source: "qrc:///res/proto.svg" } } Text { id: label_proto text: qsTr("协议调试") width: parent.width color: "white" font.pointSize: 10 anchors.top: button_proto.bottom } Text { text: qsTr("未连接") width: parent.width color: "white" font.pointSize: 10 anchors.bottom: parent.bottom } } } SerialSelect{ id: uart_choose width: parent.width - 80 height: parent.height } NetSelect{ id: net_choose width: parent.width - 80 height: parent.height } ProtoDebug{ id: proto_debug width: parent.width - 80 height: parent.height visible: false } } }