QML 布局管理器之GridLayout 项目demo

news2024/9/30 3:32:46

一.气体控制效果图

二.界面布局代码实现

//DottedLline.qml  虚线绘制

import QtQuick 2.12
import QtQuick.Shapes 1.12

Shape
{
    id:canvas
    width: parent.width
    height: parent.height
    ShapePath
    {
       strokeStyle: ShapePath.DashLine
       startX: 8
       startY: 10
       dashPattern: [1, 3]
       PathLine{x:canvas.width;y:10}
       PathLine{x:canvas.width;y:canvas.height}
       PathLine{x:8;y:canvas.height}
       PathLine{x:8;y:10}
       fillColor: "transparent"
       strokeColor: "black";
       strokeWidth: 2;
    }
}

// GasControl.qml  气体控制界面布局

import QtQuick 2.0
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
import QtQuick.Controls 1.4
import QtQuick.Shapes 1.12

Rectangle
{
    id:_root
    color: "transparent"
    anchors.fill: parent

    DottedLline
    {
        id:dottLine
        anchors{
            top: parent.top
            left: parent.left
            leftMargin: 170;
        }
        width: 250;
        height: 190;
    }

    Rectangle
    {
        id: viewTitle
        anchors{
            top: parent.top
            left: parent.left
        }
        width: parent.width
        height: 32

        color: "transparent"
        property int topmargin:17

        Text
        {
            id:proportlValve
            anchors{
                top: parent.top
                left: parent.left
                topMargin: viewTitle.topmargin
                leftMargin: 240
            }
            width: 80
            height: 16
            text: qsTr("比例阀控制")
        }

        Text
        {
            anchors{
                top: proportlValve.bottom
                left: parent.left
                leftMargin: 220
            }
            width: 40
            height: 16
            text: qsTr("DA")
        }

        Text
        {
            anchors{
                top: proportlValve.bottom
                left: parent.left
                leftMargin: 280
            }
            width: 80
            height: 16
            text: qsTr("最大气压(") + qsTr("):")
        }
    }

    //视图
    Item
    {
        id:_layout1
        anchors{
            top: viewTitle.bottom
            left:parent.left
            leftMargin: 10
        }
        width: parent.width -263
        height:300

        property int textWidth:70
        property int textHeight:30
        property int horizonLineWidth:35
        property string ioLineColor:"black";

        GridLayout
        {
            id:_groupbox0
            anchors.fill: parent
            rows: 10
            columns: 14
            columnSpacing: 0;//[Lsy
            Item
            {
                Layout.rowSpan: 1
                Layout.columnSpan: 7
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: 16//35
            }

            //低压空气阀
            Text
            {
                Layout.row: 2
                Layout.column: 0
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                text: qsTr("低压空气:")
            }

            //下拉框
            ComboBox
            {
                id:_ComboBox1
                Layout.row: 2
                Layout.column: 1
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                model: _root.outputChannelId
            }

            //-
            Item
            {
                Layout.row: 2
                Layout.column: 2
                Layout.preferredWidth: _layout1.textWidth/2
                Layout.preferredHeight: _layout1.textHeight

                Rectangle
                {
                    id:link
                    anchors.fill: parent
                    color: "transparent"
//                  border.width: 1
//                  border.color: "gray"
                    Shape{
                        anchors.fill:link
                        ShapePath
                        {
                            startX: 0
                            startY:link.height/2
                            PathLine{x:link.width;y:link.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1
                        }
                    }
                }
            }

            //方框内部下拉框:低压空气最大气压
            Item
            {
                Layout.row: 2
                Layout.column: 3
                Layout.preferredWidth:_layout1.textWidth + powerdigit.width
                Layout.preferredHeight:_layout1.textHeight
                z:2
                Item
                {
                    anchors.fill: parent
                    Rectangle
                    {
                        id:linkLine1
                        anchors.fill: parent
                        color:"transparent"
                        Shape{
                            anchors.fill:linkLine1 //Lsy
                            ShapePath
                            {
                                startX: 0
                                startY:linkLine1.height/2
                                PathLine{x:linkLine1.width;y:linkLine1.height/2}
                                strokeColor: _layout1.ioLineColor;
                                strokeWidth: 1
                            }
                        }
                    }

                    ComboBox
                    {
                        id:_da1
                        anchors{
                            top: parent.top
                            left: parent.left
                        }
                        width: _layout1.textWidth
                        height: parent.height
                        model: _root.analogueChannelId;
                    }

                    TextField
                    {
                        id:powerdigit
                        anchors{
                            top: parent.top
                            left:_da1.right
                            leftMargin:10
                        }
                        width: _layout1.textWidth+38
                        height: _layout1.textHeight
                        z:2
                    }
                }
            }

            //-
            Item
            {
                Layout.rowSpan: 1    //[
                Layout.columnSpan: 3 //[
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.horizonLineWidth + 25  //[无指定宽度填充不起作用
                Layout.preferredHeight: _layout1.textHeight
                Rectangle
                {
                    id:link2
                    anchors.fill: parent
                    color: "transparent"
                    Shape{
                        anchors.fill:link2
                        ShapePath
                        {
                            startX: 0
                            startY:link2.height/2
                            PathLine{x:link2.width;y:link2.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1
                        }
                    }
                }
            }

            //| 空气、氧气、氮气
            Item
            {
                Layout.row: 2
                Layout.column: 7
                Layout.rowSpan: 3
                Layout.columnSpan: 1
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.maximumWidth: 1;//[Lsy

                Rectangle
                {
                    id:lowgasVerticalLine
                    anchors.fill: parent
                    anchors.topMargin: (_layout1.textHeight/2+1);
                    anchors.bottomMargin:(_layout1.textHeight/2+1);
                    color: "transparent"
//                  border.width: 1
//                  border.color: "gray"
                    Shape
                    {
                        anchors.fill: lowgasVerticalLine
                        ShapePath
                        {
                            startX: 0
                            startY: 0
                            PathLine{x:0;y:lowgasVerticalLine.height}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            Rectangle
            {
                Layout.row: 2
                Layout.column: 9
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: _layout1.textHeight
                color: "transparent"
                Text
                {
                    anchors{
                        left:parent.left
                        bottom: parent.bottom
                        leftMargin: 10
                        bottomMargin: 10
                    }
                    text: qsTr("低压总阀:")
                }
            }

            //氧气
            Text
            {
                Layout.row: 3
                Layout.column: 0
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: _layout1.textHeight
                text: qsTr("低压氧气:")
            }

            //下拉框
            ComboBox
            {
                id:_ComboBox2
                Layout.row: 3
                Layout.column: 1
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                model: _root.outputChannelId
            }

            //-
            Item
            {
                Layout.row: 3
                Layout.column: 2
                Layout.preferredWidth: _layout1.textWidth/2
                Layout.preferredHeight: _layout1.textHeight
                Rectangle
                {
                    id:link3
                    anchors.fill: parent
                    color: "transparent"
                    Shape{
                        anchors.fill:link3
                        ShapePath
                        {
                            startX: 0
                            startY:link3.height/2
                            PathLine{x:link3.width;y:link3.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1
                        }
                    }
                }
            }

            //方框内部下拉框:低压氧气最大气压
            Item
            {
                Layout.row: 3
                Layout.column: 3
                Layout.preferredWidth:_layout1.textWidth + powerdigit2.width//40
                Layout.preferredHeight:_layout1.textHeight
                z:2
                Item
                {
                    anchors.fill: parent
                    Rectangle
                    {
                        id:linkline2
                        anchors.fill: parent
                        color: "transparent"
                        Shape
                        {
                            anchors.fill: linkline2
                            ShapePath
                            {
                                startX: 0;
                                startY: linkline2.height/2
                                PathLine{x:linkline2.width;y:linkline2.height/2}
                                strokeColor: _layout1.ioLineColor;
                                strokeWidth: 1
                            }
                        }
                    }

                    ComboBox
                    {
                        id:_da2
                        anchors{
                            top: parent.top
                            left: parent.left
                        }
                        width: _layout1.textWidth
                        height: parent.height
                        model: _root.analogueChannelId;
                    }

                    TextField
                    {
                        id:powerdigit2
                        anchors{
                            top: parent.top
                            left:_da2.right
                            leftMargin:10
                        }
                        width: _layout1.textWidth + 38
                        height: _layout1.textHeight
                        z:2
                    }
                }
            }

            //-
            Item
            {
                Layout.rowSpan: 1
                Layout.columnSpan: 3
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.horizonLineWidth + 25
                Layout.preferredHeight: _layout1.textHeight
                Rectangle
                {
                    id:oxyLine2
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape{
                        anchors.fill: oxyLine2
                        ShapePath
                        {
                            startX: 0;
                            startY:oxyLine2.height/2
                            PathLine{x:oxyLine2.width;y:oxyLine2.height/2}
                            strokeColor: "black"
                            strokeWidth: 1
                        }
                    }
                }
            }


            //氮气
            Text
            {
                Layout.row: 4
                Layout.column: 0
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: _layout1.textHeight
                text: qsTr("低压氮气:")
            }

            //下拉框
            ComboBox
            {
                id:_ComboBox3
                Layout.row:4
                Layout.column: 1
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                model: _root.outputChannelId
            }

            //-
            Item
            {
                Layout.row: 4
                Layout.column: 2
                Layout.preferredWidth: _layout1.textWidth/2
                Layout.preferredHeight: _layout1.textHeight

                Rectangle
                {
                    id:nitrogenLine
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: nitrogenLine
                        ShapePath
                        {
                            startX: 0
                            startY: nitrogenLine.height/2
                            PathLine{x:nitrogenLine.width;y:nitrogenLine.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            //方框内部下拉框:最大氮气气压下拉框
            Item
            {
                Layout.row: 4
                Layout.column: 3
                Layout.preferredWidth:_layout1.textWidth + powerdigit3.width//40
                Layout.preferredHeight:_layout1.textHeight
                z:2
                Item
                {
                    anchors.fill: parent
                    Rectangle
                    {
                        id:nitrogenPressure
                        color: "transparent"
                        anchors.fill: parent
                        Shape
                        {
                            anchors.fill: nitrogenPressure
                            ShapePath
                            {
                                startX: 0;
                                startY: nitrogenPressure.height/2;
                                PathLine{x:nitrogenPressure.width;y:nitrogenPressure.height/2}
                                strokeColor:_layout1.ioLineColor;
                                strokeWidth: 1;
                            }
                        }
                    }

                    ComboBox
                    {
                        id:_da3
                        anchors{
                            top: parent.top
                            left: parent.left
                        }
                        width: _layout1.textWidth
                        height: parent.height
                        model: _root.analogueChannelId;
                    }

                    TextField
                    {
                        id:powerdigit3
                        anchors{
                            top: parent.top
                            left:_da3.right
                            leftMargin:10
                        }
                        width: _layout1.textWidth + 38
                        height:_layout1.textHeight
                        z:2
                    }
                }
            }

            //-
            Item
            {
                Layout.rowSpan: 1
                Layout.columnSpan: 3
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.horizonLineWidth + 25
                Layout.preferredHeight: _layout1.textHeight
                Rectangle
                {
                    id:nitrogenLine2
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: nitrogenLine2
                        ShapePath
                        {
                            startX: 0;
                            startY: nitrogenLine2.height/2;
                            PathLine{x:nitrogenLine2.width;y:nitrogenLine2.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }


            Rectangle
            {
                Layout.row: 4
                Layout.column: 13
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: _layout1.textHeight
                color: "transparent"
                Text
                {
                    anchors{
                        left:parent.left
                        bottom: parent.bottom
                        leftMargin: 20
                        bottomMargin: 10
                    }
                    text: qsTr("总阀:")
                }
            }

            //高压空气
            Text
            {
                Layout.row: 6
                Layout.column: 0
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: _layout1.textHeight
                text: qsTr("高压空气:")
            }

            //下拉框
            ComboBox
            {
                id:_ComboBox4
                Layout.row: 6
                Layout.column: 1
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                z:1
                model: _root.outputChannelId
            }

            //-
            Item
            {
                Layout.row: 6
                Layout.column: 2
                Layout.rowSpan: 1
                Layout.columnSpan: 5
                Layout.fillWidth: true
                Layout.fillHeight: true
                Rectangle
                {
                    id:highPressreAirHLine
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: highPressreAirHLine
                        ShapePath
                        {
                            startX: 0;
                            startY: highPressreAirHLine.height/2;
                            PathLine{x:highPressreAirHLine.width;y:highPressreAirHLine.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            //| 高压总阀
            Item
            {
                Layout.row: 6
                Layout.column: 7
                Layout.rowSpan: 3
                Layout.columnSpan: 1
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.maximumWidth: 1;//Lsy

                Rectangle
                {
                    id:highPressureTotalFa
                    anchors.fill: parent
                    anchors.topMargin:_layout1.textHeight/2+3;
                    anchors.bottomMargin:_layout1.textHeight/2+3;
                    color: "transparent"
                    //                    border.width: 1
                    //                    border.color: "gray"
                    Shape
                    {
                        anchors.fill: highPressureTotalFa
                        ShapePath
                        {
                            startX: 0;
                            startY: 0;
                            PathLine{x:0;y:highPressureTotalFa.height}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }


            Rectangle
            {
                Layout.row: 6
                Layout.column: 9
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: _layout1.textHeight
                color: "transparent"
                Text
                {
                    anchors{
                        left:parent.left
                        bottom: parent.bottom
                        leftMargin: 10
                        bottomMargin: 10
                    }
                    text: qsTr("高压总阀:")
                }
            }

            //- 低压总阀
            Item
            {
                Layout.row: 3
                Layout.column: 8
                Layout.rowSpan: 1
                Layout.columnSpan: 1
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.horizonLineWidth
                Layout.preferredHeight: _layout1.textHeight

                Rectangle
                {
                    id:lowPressure
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: lowPressure
                        ShapePath
                        {
                            startX: 0;
                            startY:lowPressure.height/2;
                            PathLine{x:lowPressure.width;y:lowPressure.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            //低压总阀 ComboBox
            ComboBox
            {
                id:_ComboBox7
                Layout.row: 3
                Layout.column: 9
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                z:2
                model: _root.outputChannelId
            }

            //低压总阀 -
            Item
            {
                Layout.row: 3
                Layout.column: 10
                Layout.rowSpan: 1
                Layout.columnSpan: 1//5
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.horizonLineWidth
                Layout.preferredHeight: _layout1.textHeight

                Rectangle
                {
                    id:lowPressureFaH
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: lowPressureFaH
                        ShapePath
                        {
                            startX: 0;
                            startY: lowPressureFaH.height/2;
                            PathLine{x:lowPressureFaH.width;y:lowPressureFaH.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }


            //| 总阀
            Item
            {
                Layout.row: 3
                Layout.column: 11//13//10  ??
                Layout.rowSpan: 5
                Layout.columnSpan: 1
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.maximumWidth: 1 //Lsy

                Rectangle
                {
                    id:lowPressureFaVertical
                    anchors.fill: parent
                    anchors.topMargin: _layout1.textHeight/2+3;
                    anchors.bottomMargin: _layout1.textHeight/2+3;
                    color: "transparent"
//                    border.width: 1
//                    border.color: "gray"
                    Shape
                    {
                        anchors.fill: lowPressureFaVertical
                        ShapePath
                        {
                            startX: 0;
                            startY: 0;
                            PathLine{x:0;y:lowPressureFaVertical.height}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            //- 总阀
            Item
            {
                Layout.row: 5
                Layout.column: 12//12
                Layout.rowSpan: 1
                Layout.columnSpan: 1//5
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.horizonLineWidth
                Layout.preferredHeight: _layout1.textHeight

                Rectangle
                {
                    id:totalFa
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: totalFa
                        ShapePath
                        {
                            startX: 0;
                            startY: totalFa.height/2;
                            PathLine{x:totalFa.width;y:totalFa.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            //总阀 ComboBox
            ComboBox
            {
                id:_ComboBox9
                Layout.row: 5
                Layout.column: 13
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                Layout.alignment: Qt.AlignLeft
                Layout.leftMargin: -3
                model: _root.outputChannelId
            }

            //高压氧气
            Text
            {
                Layout.row: 7
                Layout.column: 0
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: _layout1.textHeight
                text: qsTr("高压氧气:")
            }

            //下拉框
            ComboBox
            {
                id:_ComboBox5
                Layout.row: 7
                Layout.column: 1
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                z:1
                model: _root.outputChannelId
            }

            //-
            Item
            {
                Layout.row: 7
                Layout.column: 2
                Layout.rowSpan: 1
                Layout.columnSpan: 5
                Layout.fillWidth: true
                Layout.fillHeight: true

                Rectangle
                {
                    id:highPressureOxyHLine
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: highPressureOxyHLine
                        ShapePath
                        {
                            startX: 0;
                            startY: highPressureOxyHLine.height/2;
                            PathLine{x:highPressureOxyHLine.width;y:highPressureOxyHLine.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            //高压氮气
            Text
            {
                Layout.row: 8
                Layout.column: 0
                Layout.preferredWidth: _layout1.textWidth
                Layout.preferredHeight: _layout1.textHeight
                text: qsTr("高压氮气:")
            }

            //下拉框
            ComboBox
            {
                id:_ComboBox6
                Layout.row: 8
                Layout.column: 1
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                z:1
                model: _root.outputChannelId
            }

            //-
            Item
            {
//                Layout.row: 8
//                Layout.column: 2
                Layout.rowSpan: 1
                Layout.columnSpan: 5
                Layout.fillWidth: true
                Layout.fillHeight: true

                Rectangle
                {
                    id:nitrogenHLine
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"

                    Shape
                    {
                        anchors.fill: nitrogenHLine
                        ShapePath
                        {
                            startX: 0;
                            startY: nitrogenHLine.height/2;
                            PathLine{x:nitrogenHLine.width;y:nitrogenHLine.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            //- 高压总阀
            Item
            {
                Layout.row: 7
                Layout.column: 8
                Layout.rowSpan: 1
                Layout.columnSpan: 1
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.horizonLineWidth
                Layout.preferredHeight: _layout1.textHeight

                Rectangle
                {
                    id:heighPressureTotalFaHLine
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: heighPressureTotalFaHLine
                        ShapePath
                        {
                            startX: 0;
                            startY:heighPressureTotalFaHLine.height/2;
                            PathLine{x:heighPressureTotalFaHLine.width;y:heighPressureTotalFaHLine.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }

            //高压总阀 ComboBox
            ComboBox
            {
                id:_ComboBox8
                Layout.row: 7
                Layout.column: 9
                Layout.preferredWidth:_layout1.textWidth
                Layout.preferredHeight:_layout1.textHeight
                z:2
                model: _root.outputChannelId
            }

            //高压总阀 -
            Item
            {
                Layout.row: 7
                Layout.column: 10
                Layout.rowSpan: 1
                Layout.columnSpan: 1//5
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.preferredWidth: _layout1.horizonLineWidth
                Layout.preferredHeight: _layout1.textHeight

                Rectangle
                {
                    id:highPressureTotalFaH
                    anchors.fill: parent
                    color: "transparent"
                    //border.width: 1
                    //border.color: "gray"
                    Shape
                    {
                        anchors.fill: highPressureTotalFaH
                        ShapePath
                        {
                            startX: 0;
                            startY: highPressureTotalFaH.height/2;
                            PathLine{x:highPressureTotalFaH.width;y:highPressureTotalFaH.height/2}
                            strokeColor: _layout1.ioLineColor;
                            strokeWidth: 1;
                        }
                    }
                }
            }
        }
    }
}

//main.qml  主界面调用 

import QtQuick 2.12
import QtQuick.Window 2.12

import "./qml"

Window
{
    visible: true
    width: 900
    height: 375
    title: qsTr("Test Example")

    GasControl
    {

    }

}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1540932.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

多线程和线程同步

文章目录 进程和线程线程的操作线程创建线程退出线程回收线程分离线程取消和ID比较 线程同步互斥锁死锁读写锁条件变量信号量 进程和线程 线程是轻量级的进程,在Linux环境下线程的本质还是进程。 在计算机上运行的程序是一组指令及指令参数的组合,指令按…

Web前端-JS

JavaScript,简称js:负责网页的行为(交互效果)。是一门跨平台,面向对象的脚本语言(编写出来的语言不需要编译,通过浏览器的解释就可以运行) JS引入方式 1.内嵌样式 这样打开页面就会…

毕业答辩PPT模板涵盖多种风格,包括母版的设计及主题色的设计

毕业答辩PPT模板涵盖多种风格,包括母版的设计及主题色的设计 前言一两个页面的展示研究内容主题概述主题内容一:主要面向三点研究内容主题内容二:主要面向两点研究内容主题内容三:主要面向包含应用开发的研究 前言 之前做了有关开…

Oracle Data Guard部署

Oracle的主备DG搭建 1. 修改主机名,同步时间 主库IP:192.168.100.137 备库IP:192.168.100.138配置主机名(主库) Hostname zygjpdb vim /etc/hosts 192.168.100.137 zygjpdb 192.168.100.138 zygjsdbvim /etc/sysconfig/network HOSTNAMEzygjpdb ------…

电脑如何关闭自启动应用?cmd一招解决问题

很多小伙伴说电脑刚开机就卡的和定格动画似的,cmd一招解决问题: CtrlR打开cmd,输入:msconfig 进入到这个界面: 点击启动: 打开任务管理器,禁用不要的自启动应用就ok了

机器学习算法那些事 | 使用Transformer模型进行时间序列预测实战

本文来源公众号“机器学习算法那些事”,仅用于学术分享,侵权删,干货满满。 原文链接:使用Transformer模型进行时间序列预测实战 时间序列预测是一个经久不衰的主题,受自然语言处理领域的成功启发,transfo…

C语言分支和循环

目录 一.分支 一.if 二.if else 三.if else嵌套 四.else if 五.switch语句 二.循环 一.while (do while)break : 二.for函数: 三.goto语句: 四.猜数字: 一.分支 一.if if要条件为真才执行为假不执行而且if只能执行后面第一条如果要执行多条就…

Java基础之关键字instanceof(七)

简介: CSDN博客专家,专注Android/Linux系统,分享多mic语音方案、音视频、编解码等技术,与大家一起成长! 优质专栏:Audio工程师进阶系列【原创干货持续更新中……】🚀 优质专栏:多媒…

【C语言】linux内核pci_iomap

一、pci_iomap /** pci_iomap 是一个用于映射 PCI 设备的 BAR(Base Address Register,基地址寄存器)的函数。* 此函数返回指向内存映射 IO 的指针,用于直接访问 PCI 设备的内存或 I/O 空间。* * 参数:* dev - 指向pci_dev结构的指…

Android Jetpack Compose基础之组件的帧渲染

Android Jetpack Compose基础之组件的帧渲染 组合布局LayoutModifier示例 LayoutCompsable示例 绘制CanvasDrawModifierDrawModifier-drawWithContent示例 DrawModifier-drawBehind源码示例 DrawModifier-drawWithCache源码示例 拓展Modifier.graphicsLayer Android View 系统&…

0基础 三个月掌握C语言(13)-下

数据在内存中的存储 浮点数在内存中的存储 常见的浮点数:3.141592、1E10等 浮点数家族包括:float、double、long double类型 浮点数表示的范围:在float.h中定义 练习 关于(float*)&n: &n:这是一…

基于SSM的宠物领养平台的设计与实现

基于SSM的宠物领养平台的设计与实现 获取源码——》公主号:计算机专业毕设大全 获取源码——》公主号:计算机专业毕设大全

Three.js 中的 OrbitControls 是一个用于控制相机围绕目标旋转以及缩放、平移等操作的控制器。

demo案例 Three.js 中的 OrbitControls 是一个用于控制相机围绕目标旋转以及缩放、平移等操作的控制器。下面是它的详细讲解: 构造函数: OrbitControls(object: Camera, domElement?: HTMLElement)object:THREE.Camera 实例,控制器将围绕…

LibFuzzer 基本使用

文章目录 前言环境搭建基础使用编写 fuzz target编译链接demo 测试 && 输出日志分析心脏滴血漏洞测试 提高代码覆盖率和测试速度指定种子语料库多核并行 Fuzz使用字典 参考 前言 相较于 AFL 来说,LibFuzzer 在单个进程内完成模糊测试,以此来避免…

Nacos部署(一)Linux部署Nacos2.3.x单机环境

😊 作者: 一恍过去 💖 主页: https://blog.csdn.net/zhuocailing3390 🎊 社区: Java技术栈交流 🎉 主题: Nacos部署(一)Linux部署Nacos2.3.x单机环境 ⏱️…

【NC20313】仪仗队

题目 仪仗队 欧拉函数,找规律 思路 这好像是一道非常简单的找规律问题,所以你从 1 1 1 开始枚举,计算出当 N i Ni Ni 时的结果 a n s i ans_i ansi​,所以你得出了以下结果: Nans10233549513621725837 令人失望…

招聘自媒体编辑岗位的人才测评方案

人才测评工具在招聘入职的方案,在线工具网根据自媒体岗位的特性和需求来分析,并制定自媒体主编的测评方案。 自媒体作为互联网时代的产物,自然也为我们带来了很多的福利,例如:海量的信息、快捷的传媒方式,那…

学习次模函数-第2章 定义

纵观本专著,我们认为及其幂集(即, 所有子集的集合),其基数为。我们也考虑一个实值集函数,使得。 与凸函数的一般约定相反(见附录A),我们不允许函数有无穷大的值。 次模分…

一文搞懂数据链路层

数据链路层 1. 简介2. MAC3. 以太网 1. 简介 (1)概念 链路(link)是一条无源的点到点的物理线路段,中间没有任何其他的交换结点。 数据链路(data link) 除了物理线路(双绞线电缆、同轴电缆、光线等介质)外&#xff0…

Java获取方法参数名称方案||SpringBoot配置顺序注解

一: Java获取方法参数名称的方法 普盲: getDeclaredMethods与getMethods的的区别 1、getMethods返回一个包含某些 Method 对象的数组,这些对象反映此 Class 对象所表示的类或接口的公共 member 方法。 2、getDeclaredMethods返回 Method 对象的一个数组&#xff0c…