Adding a Botton to QGC during custom build

 Open " qgroundcontrol [Stable_V4.0] "

      Then " Reources "   , which is below Sources  (  which is with c++ extension & sign )

                Then " qgroundcontrol.qrc "

                   Then folder with name " /toolbar "    , which below " /qml "

                        Now double-click on  " MainToolBar.qml "

             

       - now you are ready to edit the code ,  ,,,     

                 - navigate to last " QGCToolBarButton "

                                                   - now goto it's close tag .

                                                   - but not  goto its parent close tag e.i.  RowLayout {    ...  ..... }


                                       ,,,,,,,actually we are adding own botton at last of " all upper QGC Tool bottons i.e. 5 th buton in that row.


     i.e.   

As Shown in the Picture above 


 " Now Run & Build as shown in previous blog "


My Code_Change Jeourney to qt : for QGroundControll      






Text {

                        id: as

                        text: qsTr("Ayush Sankrit")

                    }



1.)        Rectangle {

                    id: tutRect

                    Layout.fillHeight: true

                    width: height

                    color: "red"

    Text {

                        id: as

                        text: qsTr("Ayush Sankrit")

                    }

                    

                }


2.) Rectangle {

                    property bool isClicked: false


                    id: tutRect

                    Layout.fillHeight: true

                    width: height

                    color: isClicked ? "green" : "red"


                    MouseArea {

                        anchors.fill: parent

                        onClicked: {

                            tutRect.isClicked = !tutRect.isClicked

                        }

                    }

                }


3.)  Button {

                    id: tutBtn

                    width: height

                    text: "BTN"

                    onClicked: {


                    }


                }


4.) QGCToolBarButton {

                    id:                 tutButton

                    Layout.fillHeight:  true

                    icon.source:        "/qmlimages/arrow-down.png"

                    visible:            true

                    onClicked: {

                        buttonRow.clearAllChecks()

                        checked = true

                    }

                }




Comments

Popular posts from this blog

Generating a signed apk from Qt Creator

How make Signed Firmware from official Ardupilot using Cryptography

Drone Jamming & Detecting System :