<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to make full screen]]></title><description><![CDATA[<p dir="auto">I am working on an open source project. When I opened the project on the tablet, it first took up the whole screen. I threw format on the tablet and installed windows 10 myself, this time the application does not open in full screen<br />
When you look at the QT codes, if it is mobile or if the screen is small, it takes full screen mode, although I close this part on the qml side, it does not cover the entire screen.<br />
I'll post the codes as comments.<br />
thank you in advance for the help</p>
]]></description><link>https://forum.qt.io/topic/142846/how-to-make-full-screen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 14:17:08 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/142846.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Feb 2023 14:34:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to make full screen on Mon, 13 Feb 2023 05:05:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joecfd">@<bdi>JoeCFD</bdi></a>   I made the comments line everywhere, I only made the part you said active, but it is still full screen, the vindow and application parts are visible at the bottom.</p>
<pre><code>ApplicationWindow {
    id:             mainWindow
//    minimumWidth:   ScreenTools.isMobile ? Screen.width  : Math.min(ScreenTools.defaultFontPixelWidth * 100, Screen.width)
//    minimumHeight:  ScreenTools.isMobile ? Screen.height : Math.min(ScreenTools.defaultFontPixelWidth * 50, Screen.height)
//    visible: true
    visibility: Window.FullScreen
//    visibility: Window.FullScreen
//    visibility: mainWindow.FullScreen
//    Component.onCompleted: {
//        console.log((ScreenTools.defaultFontPixelWidth * 100).toString(),"--",Screen.width.toString(),"\n\n")
//        //-- Full screen on mobile or tiny screens
////        mainWindow.minimumWidth = Math.min(1000,1000/*ScreenTools.defaultFontPixelWidth * 100, Screen.width*/)
////        mainWindow.showFullScreen()
////        console.log("\n\nsignal\n\n")
//        if (!ScreenTools.isMobile || Screen.height / ScreenTools.realPixelDensity &lt; 120 /*|| 1 === 1*/) {
//             console.log("APP: true")
////            mainWindow.FullScreen
//            mainWindow.showFullScreen()

//        } else {
//            console.log("APP: false")
//            width   = ScreenTools.isMobile ? Screen.width  : Math.min(250 * Screen.pixelDensity, Screen.width)
//            height  = ScreenTools.isMobile ? Screen.height : Math.min(150 * Screen.pixelDensity, Screen.height)
////            mainWindow.showFullScreen()
//        }

//        // Start the sequence of first run prompt(s)
//        firstRunPromptManager.nextPrompt()
//    }

</code></pre>
]]></description><link>https://forum.qt.io/post/747371</link><guid isPermaLink="true">https://forum.qt.io/post/747371</guid><dc:creator><![CDATA[serkan_tr]]></dc:creator><pubDate>Mon, 13 Feb 2023 05:05:43 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 15:01:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/serkan_tr">@<bdi>serkan_tr</bdi></a> I said remove or comment them out.<br />
Use only<br />
visibility: Window.FullScreen</p>
]]></description><link>https://forum.qt.io/post/747134</link><guid isPermaLink="true">https://forum.qt.io/post/747134</guid><dc:creator><![CDATA[JoeCFD]]></dc:creator><pubDate>Fri, 10 Feb 2023 15:01:53 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 14:58:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joecfd">@<bdi>JoeCFD</bdi></a><br />
27 and 28 no matter what I do, only the smallest state changes<br />
The "windows taskbar" part at the bottom still appears<br />
![Screenshot (1).png](Request Entity Too Large)</p>
]]></description><link>https://forum.qt.io/post/747133</link><guid isPermaLink="true">https://forum.qt.io/post/747133</guid><dc:creator><![CDATA[serkan_tr]]></dc:creator><pubDate>Fri, 10 Feb 2023 14:58:03 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 15:07:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/serkan_tr">@<bdi>serkan_tr</bdi></a> can you show your picture? I use it for Linux and Android without issues. Maybe Windows 10 is too old.<br />
mainWindow.showFullScreen() is not needed.</p>
<p dir="auto">You can also try to get screen size from your main and set it somewhere.<br />
QRect rec = QGuiApplication::screens().at( 0 )-&gt;geometry();<br />
QSize( rec.width(), rec.height() )  is the screen size;</p>
<p dir="auto">then, pass the size to<br />
height and width of your mainWindow</p>
]]></description><link>https://forum.qt.io/post/747132</link><guid isPermaLink="true">https://forum.qt.io/post/747132</guid><dc:creator><![CDATA[JoeCFD]]></dc:creator><pubDate>Fri, 10 Feb 2023 15:07:28 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 14:46:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joecfd">@<bdi>JoeCFD</bdi></a> I tried changing these lines but the screen size still did not change.<br />
what exactly should i write</p>
]]></description><link>https://forum.qt.io/post/747130</link><guid isPermaLink="true">https://forum.qt.io/post/747130</guid><dc:creator><![CDATA[serkan_tr]]></dc:creator><pubDate>Fri, 10 Feb 2023 14:46:35 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 14:43:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/serkan_tr">@<bdi>serkan_tr</bdi></a> said in <a href="/post/747126">How to make full screen</a>:</p>
<blockquote>
<p dir="auto">if (!ScreenTools.isMobile || Screen.height / ScreenTools.realPixelDensity &lt; 120 /<em>|| 1 === 1</em>/) {<br />
console.log("APP: true")<br />
//            mainWindow.FullScreen<br />
mainWindow.showFullScreen()</p>
<pre><code>    } else {
        console.log("APP: false")
        width   = ScreenTools.isMobile ? Screen.width  : Math.min(250 * Screen.pixelDensity, Screen.width)
        height  = ScreenTools.isMobile ? Screen.height : Math.min(150 * Screen.pixelDensity, Screen.height)
</code></pre>
<p dir="auto">//            mainWindow.showFullScreen()<br />
}<br />
I guess this is what I'm doing.  Even if I put "mainWindow.showFullScreen()" else here, it doesn't work, the bottom part is still visible.<br />
My goal is to show the inside of my app as it was before formatting the tablet. I want it to completely fill the screen. no matter what device, tablet phone computer only this one should appear</p>
</blockquote>
]]></description><link>https://forum.qt.io/post/747128</link><guid isPermaLink="true">https://forum.qt.io/post/747128</guid><dc:creator><![CDATA[serkan_tr]]></dc:creator><pubDate>Fri, 10 Feb 2023 14:43:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 14:41:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/serkan_tr">@<bdi>serkan_tr</bdi></a> I happend to know the source code a bit. You may try to replace the two lines(line 27 and 28):</p>
<pre><code>    minimumWidth:   ScreenTools.isMobile ? Screen.width  : Math.min(ScreenTools.defaultFontPixelWidth * 100, Screen.width)
    minimumHeight:  ScreenTools.isMobile ? Screen.height : Math.min(ScreenTools.defaultFontPixelWidth * 50, Screen.height)
</code></pre>
<p dir="auto">of the code here<br />
<a href="https://github.com/mavlink/qgroundcontrol/blob/master/src/ui/MainRootWindow.qml" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/mavlink/qgroundcontrol/blob/master/src/ui/MainRootWindow.qml</a><br />
with<br />
visibility: Window.FullScreen<br />
to see if it helps.</p>
]]></description><link>https://forum.qt.io/post/747127</link><guid isPermaLink="true">https://forum.qt.io/post/747127</guid><dc:creator><![CDATA[JoeCFD]]></dc:creator><pubDate>Fri, 10 Feb 2023 14:41:06 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 14:39:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/serkan_tr">@<bdi>serkan_tr</bdi></a>  main.qml</p>
<pre><code>ApplicationWindow {
    id:             mainWindow
    minimumWidth:   ScreenTools.isMobile ? Screen.width  : Math.min(ScreenTools.defaultFontPixelWidth * 100, Screen.width)
    minimumHeight:  ScreenTools.isMobile ? Screen.height : Math.min(ScreenTools.defaultFontPixelWidth * 50, Screen.height)
    visible: true
//    visibility: mainWindow.FullScreen
    Component.onCompleted: {
        console.log((ScreenTools.defaultFontPixelWidth * 100).toString(),"--",Screen.width.toString(),"\n\n")
        //-- Full screen on mobile or tiny screens
//        mainWindow.minimumWidth = Math.min(1000,1000/*ScreenTools.defaultFontPixelWidth * 100, Screen.width*/)
//        mainWindow.showFullScreen()
//        console.log("\n\nsignal\n\n")
        if (!ScreenTools.isMobile || Screen.height / ScreenTools.realPixelDensity &lt; 120 /*|| 1 === 1*/) {
             console.log("APP: true")
//            mainWindow.FullScreen
            mainWindow.showFullScreen()

        } else {
            console.log("APP: false")
            width   = ScreenTools.isMobile ? Screen.width  : Math.min(250 * Screen.pixelDensity, Screen.width)
            height  = ScreenTools.isMobile ? Screen.height : Math.min(150 * Screen.pixelDensity, Screen.height)
//            mainWindow.showFullScreen()
        }

        // Start the sequence of first run prompt(s)
        firstRunPromptManager.nextPrompt()
    }

    QtObject {
        id: firstRunPromptManager

        property var currentDialog:     null
        property var rgPromptIds:       QGroundControl.corePlugin.firstRunPromptsToShow()
        property int nextPromptIdIndex: 0

        function clearNextPromptSignal() {
            if (currentDialog) {
                currentDialog.closed.disconnect(nextPrompt)
            }
        }

        function nextPrompt() {
            if (nextPromptIdIndex &lt; rgPromptIds.length) {
                var component = Qt.createComponent(QGroundControl.corePlugin.firstRunPromptResource(rgPromptIds[nextPromptIdIndex]));
                currentDialog = component.createObject(mainWindow)
                currentDialog.closed.connect(nextPrompt)
                currentDialog.open()
                nextPromptIdIndex++
            } else {
                currentDialog = null
                showPreFlightChecklistIfNeeded()
            }
        }
    }

    property var                _rgPreventViewSwitch:       [ false ]

    readonly property real      _topBottomMargins:          ScreenTools.defaultFontPixelHeight * 0.5

    //-------------------------------------------------------------------------
    //-- Global Scope Variables

    QtObject {
        id: globals

        readonly property var       activeVehicle:                  QGroundControl.multiVehicleManager.activeVehicle
        readonly property real      defaultTextHeight:              ScreenTools.defaultFontPixelHeight
        readonly property real      defaultTextWidth:               ScreenTools.defaultFontPixelWidth
        readonly property var       planMasterControllerFlyView:    flightView.planController
        readonly property var       guidedControllerFlyView:        flightView.guidedController

        property var                planMasterControllerPlanView:   null
        property var                currentPlanMissionItem:         planMasterControllerPlanView ? planMasterControllerPlanView.missionController.currentPlanViewItem : null
    }

    /// Default color palette used throughout the UI
    QGCPalette { id: qgcPal; colorGroupEnabled: true }

    //-------------------------------------------------------------------------
    //-- Actions

    signal armVehicleRequest
    signal forceArmVehicleRequest
    signal disarmVehicleRequest
    signal vtolTransitionToFwdFlightRequest
    signal vtolTransitionToMRFlightRequest
    signal showPreFlightChecklistIfNeeded

    //-------------------------------------------------------------------------
    //-- Global Scope Functions

    /// Prevent view switching
    function pushPreventViewSwitch() {
        _rgPreventViewSwitch.push(true)
    }

    /// Allow view switching
    function popPreventViewSwitch() {
        if (_rgPreventViewSwitch.length == 1) {
            console.warn("mainWindow.popPreventViewSwitch called when nothing pushed")
            return
        }
        _rgPreventViewSwitch.pop()
    }

    /// @return true: View switches are not currently allowed
    function preventViewSwitch() {
        return _rgPreventViewSwitch[_rgPreventViewSwitch.length - 1]
    }

    function viewSwitch(currentToolbar) {
        toolDrawer.visible      = false
        toolDrawer.toolSource   = ""
        flightView.visible      = false
        planView.visible        = false
        toolbar.currentToolbar  = currentToolbar
    }

    function showFlyView() {
        if (!flightView.visible) {
            mainWindow.showPreFlightChecklistIfNeeded()
        }
        viewSwitch(toolbar.flyViewToolbar)
        flightView.visible = true
    }

    function showPlanView() {
        viewSwitch(toolbar.planViewToolbar)
        planView.visible = true
    }

    function showTool(toolTitle, toolSource, toolIcon) {
        toolDrawer.backIcon     = flightView.visible ? "/qmlimages/PaperPlane.svg" : "/qmlimages/Plan.svg"
        toolDrawer.toolTitle    = toolTitle
        toolDrawer.toolSource   = toolSource
        toolDrawer.toolIcon     = toolIcon
        toolDrawer.visible      = true
    }
    function showMapTool(toolSourceMap) {
        toolDrawermap.toolSourceMap   = toolSourceMap
        toolDrawermap.visible         = true
    }
    function showLedTool(toolSourceLed){
      toolDrawerled.toolSourceLed=toolSourceLed
        if(toolDrawerled.visible==false){
         toolDrawerled.visible=true
        }
        else{
         toolDrawerled.visible=false
        }
    }
    function showCalibTool(toolSourceCalib){
        toolDrawercalibration.toolSourceCalib = toolSourceCalib
        if(toolDrawercalibration.visible==false){
         toolDrawercalibration.visible=true
        }
        else{
         toolDrawercalibration.visible=false
        }
    }

    function showAnalyzeTool() {
        showTool(qsTr("Analyze Tools"), "AnalyzeView.qml", "/qmlimages/Analyze.svg")
    }

    function showSetupTool() {
        showTool(qsTr("Vehicle Setup"), "SetupView.qml", "/qmlimages/Gears.svg")
    }

    function showSettingsTool() {
        showTool(qsTr("Application Settings"), "AppSettings.qml", "/res/QGCLogoWhite")
    }
    function showLedToolpup(){
       showLedTool("LedSettings2.qml")
    }
    function showMapToolpup(){
    showMapTool("MapSettings.qml")
    }
    function showCamTool(){
    showTool(qsTr("Camera Settings"),"CameraSettings.qml","/InstrumentValueIcons/camera-svgrepo-white.svg")
    }
    function showCalibToolpup(){
    showCalibTool("CalibrationSettings.qml")
    }

    //-------------------------------------------------------------------------
    //-- Global simple message dialog

    function showMessageDialog(dialogTitle, dialogText, buttons = StandardButton.Ok, acceptFunction = null) {
        simpleMessageDialogComponent.createObject(mainWindow, { title: dialogTitle, text: dialogText, buttons: buttons, acceptFunction: acceptFunction }).open()
    }

    // This variant is only meant to be called by QGCApplication
    function _showMessageDialog(dialogTitle, dialogText) {
        showMessageDialog(dialogTitle, dialogText)
    }

    Component {
        id: simpleMessageDialogComponent

        QGCSimpleMessageDialog {
        }
    }

    /// Saves main window position and size
    MainWindowSavedState {
        window: mainWindow
    }

    property bool _forceClose: false

    function finishCloseProcess() {
        _forceClose = true
        // For some reason on the Qml side Qt doesn't automatically disconnect a signal when an object is destroyed.
        // So we have to do it ourselves otherwise the signal flows through on app shutdown to an object which no longer exists.
        firstRunPromptManager.clearNextPromptSignal()
        QGroundControl.linkManager.shutdown()
        QGroundControl.videoManager.stopVideo();
        mainWindow.close()
    }

    // On attempting an application close we check for:
    //  Unsaved missions - then
    //  Pending parameter writes - then
    //  Active connections

    property string closeDialogTitle: qsTr("Close %1").arg(QGroundControl.appName)

    function checkForUnsavedMission() {
        if (globals.planMasterControllerPlanView &amp;&amp; globals.planMasterControllerPlanView.dirty) {
            showMessageDialog(closeDialogTitle,
                              qsTr("You have a mission edit in progress which has not been saved/sent. If you close you will lose changes. Are you sure you want to close?"),
                              StandardButton.Yes | StandardButton.No,
                              function() { checkForPendingParameterWrites() })
        } else {
            checkForPendingParameterWrites()
        }
    }

    function checkForPendingParameterWrites() {
        for (var index=0; index&lt;QGroundControl.multiVehicleManager.vehicles.count; index++) {
            if (QGroundControl.multiVehicleManager.vehicles.get(index).parameterManager.pendingWrites) {
                mainWindow.showMessageDialog(closeDialogTitle,
                    qsTr("You have pending parameter updates to a vehicle. If you close you will lose changes. Are you sure you want to close?"),
                    StandardButton.Yes | StandardButton.No,
                    function() { checkForActiveConnections() })
                return
            }
        }
        checkForActiveConnections()
    }

    function checkForActiveConnections() {
        if (QGroundControl.multiVehicleManager.activeVehicle) {
            mainWindow.showMessageDialog(closeDialogTitle,
                qsTr("There are still active connections to vehicles. Are you sure you want to exit?"),
                StandardButton.Yes | StandardButton.No,
                function() { finishCloseProcess() })
        } else {
            finishCloseProcess()
        }
    }

    onClosing: {
        if (!_forceClose) {
            close.accepted = false
            checkForUnsavedMission()
        }
    }

    //-------------------------------------------------------------------------
    /// Main, full window background (Fly View)
    background: Item {
        id:             rootBackground
        anchors.fill:   parent
    }

    //-------------------------------------------------------------------------
    /// Toolbar
    header: MainToolBar {
        id:         toolbar
        height:     ScreenTools.headerHeight
        visible:    false /*!QGroundControl.videoManager.fullScreen*/
    }

    footer: LogReplayStatusBar {
        visible: QGroundControl.settingsManager.flyViewSettings.showLogReplayStatusBar.rawValue
    }

    function showToolSelectDialog() {
        if (!mainWindow.preventViewSwitch()) {
            toolSelectDialogComponent.createObject(mainWindow).open()
        }
    }

    FlyView {
        id:             flightView
        anchors.fill:   parent

    }

   /* PlanView {
        id:             planView
        anchors.fill:   parent
        visible:        false
    }*/

    function toolDrawerVisible(){
    toolDrawer.visible=false
    }

   Rectangle   {
        id:             toolDrawer

        width:         900
        height:         500
        color:qgcPal.window
        anchors{
          horizontalCenter:parent.horizontalCenter
          verticalCenter:parent.verticalCenter
        }
        visible:        false

       property alias backIcon:    backIcon.source
       property alias toolTitle:   toolbarDrawerText.text
       property alias toolSource:  toolDrawerLoader.source
       property alias toolIcon:    toolIcon.source

        Rectangle {
            id:             toolDrawerToolbar
            anchors.left:   parent.left
            anchors.right:  parent.right
            anchors.top:    parent.top
            height:         ScreenTools.toolbarHeight
            color:          parent.color
            RowLayout {
                anchors.leftMargin: ScreenTools.defaultFontPixelWidth
                anchors.left:       parent.left
                anchors.top:        parent.top
                anchors.bottom:     parent.bottom
                spacing:            ScreenTools.defaultFontPixelWidth


                QGCColoredImage {
                    id:                     backIcon
                    width:                  ScreenTools.defaultFontPixelHeight * 2
                    height:                 ScreenTools.defaultFontPixelHeight * 2
                    fillMode:               Image.PreserveAspectFit
                    mipmap:                 true
                    color:                  qgcPal.text
                }

                QGCLabel {
                    id:     backTextLabel
                    text:   qsTr("Back")
                }

                QGCLabel {
                    font.pointSize: ScreenTools.largeFontPointSize
                    text:           "&lt;"
                }

               QGCColoredImage {
                    id:                     toolIcon
                    width:                  ScreenTools.defaultFontPixelHeight * 2
                    height:                 ScreenTools.defaultFontPixelHeight * 2
                    fillMode:               Image.PreserveAspectFit
                    mipmap:                 true
                    color:                  qgcPal.text
                }

                QGCLabel {
                    id:             toolbarDrawerText
                    font.pointSize: ScreenTools.largeFontPointSize
                }
            }

            QGCMouseArea {
                anchors.top:        parent.top
                anchors.bottom:     parent.bottom
                x:                  parent.mapFromItem(backIcon, backIcon.x, backIcon.y).x
                width:              (backTextLabel.x + backTextLabel.width) - backIcon.x
                onClicked: {
                    toolDrawer.visible      = false
                    toolDrawer.toolSource   = ""
                    toolDrawermap.visible=false
                }
            }
        }

        Loader {
            id:             toolDrawerLoader
            anchors.left:   parent.left
            anchors.right:  parent.right
            anchors.top:    toolDrawerToolbar.bottom
            anchors.bottom: parent.bottom


            Connections {
                target:                 toolDrawerLoader.item
                ignoreUnknownSignals:   true
                onPopout:               toolDrawer.visible = false
            }
        }
    }
   function toolDrawermapVisible(){
   toolDrawermap.visible=false
   }
    Rectangle   {
        id:           toolDrawermap
        width:         700
        height:        300
        color:qgcPal.window
        radius: 50
        anchors{
          horizontalCenter:parent.horizontalCenter
          verticalCenter:parent.verticalCenter
        }
        visible:      false
        property alias toolSourceMap:  toolDrawerLoadermap.source


        property alias toolIconMap:    toolIconmap.source


         Rectangle {
             id:             toolDrawerToolbarmap
             anchors.left:   parent.left
             width:470
             anchors.leftMargin:40
             anchors.top:    parent.top
             anchors.topMargin:20
             radius:         90


             RowLayout {
                 anchors.leftMargin: ScreenTools.defaultFontPixelWidth
                 anchors.left:       parent.left
                 anchors.top:        parent.top
                 anchors.bottom:     parent.bottom
                 spacing:            ScreenTools.defaultFontPixelWidth


                 QGCColoredImage {
                     id:                     backIconmap
                     width:                  ScreenTools.defaultFontPixelHeight * 2
                     height:                 ScreenTools.defaultFontPixelHeight * 2
                     fillMode:               Image.PreserveAspectFit
                     mipmap:                 true
                     color:                  qgcPal.text
                    MouseArea{
                    anchors.fill:parent
                    onClicked: {

                        toolDrawermap.visible      = false
                        toolDrawer.visible=false

                    }
                    }
                 }

                 QGCLabel {
                     id:     backTextLabelmap
                     text:   qsTr("Back")
                 }

                 QGCLabel {
                     font.pointSize: ScreenTools.largeFontPointSize
                     text:           "&lt;"
                 }

                QGCColoredImage {
                     id:                     toolIconmap
                     width:                  ScreenTools.defaultFontPixelHeight * 2
                     height:                 ScreenTools.defaultFontPixelHeight * 2
                     fillMode:               Image.PreserveAspectFit
                     mipmap:                 true
                     color:                  qgcPal.text
                 }

                 QGCLabel {
                     id:             toolbarDrawerTextmap
                     font.pointSize: ScreenTools.largeFontPointSize
                 }
             }

             QGCMouseArea {
                 anchors.top:        parent.top
                 anchors.bottom:     parent.bottom
                 x:                  parent.mapFromItem(backIconmap, backIconmap.x, backIconmap.y).x
                 width:              (backTextLabelmap.x + backTextLabelmap.width) - backIconmap.x
                 onClicked: {
                     toolDrawermap.visible      = false
                     toolDrawermap.toolSource   = ""
                     toolDrawer.visible         =false
                 }
             }
         }

        Loader {
            id:             toolDrawerLoadermap
            anchors.left:   parent.left
            anchors.top:    parent.top
            anchors.right:  parent.right
            Connections {
                target:                 toolDrawerLoadermap.item
                ignoreUnknownSignals:   true
                onPopout:               toolDrawermap.visible = false
            }
        }
    }
function toolDrawerLedvisible(){
toolDrawerled.visible=false
}
    Rectangle   {
        id:           toolDrawerled
        width:         700
        height:        300
        color:qgcPal.window
        radius:50
        anchors{
          horizontalCenter:parent.horizontalCenter
          verticalCenter:parent.verticalCenter
        }
        visible:      false

        property alias toolSourceLed:  toolDrawerLoaderled.source

        Loader {
            id:             toolDrawerLoaderled
            anchors.left:   parent.left
            anchors.top:    parent.top
            anchors.right:  parent.right
            Connections {
                target:                 toolDrawerLoaderled.item
                ignoreUnknownSignals:   true
                onPopout:               toolDrawerled.visible = false
            }
        }
    }
    function toolDrawerCalibvisible(){
    toolDrawercalibration.visible=false
    }
    Rectangle   {
        id:           toolDrawercalibration
        width:         850
        height:        465
        color:qgcPal.window
        radius:50
        anchors{
          horizontalCenter:parent.horizontalCenter
          verticalCenter:parent.verticalCenter
        }
        visible:      false

        property alias toolSourceCalib:  toolDrawerLoadercalib.source

        Loader {
            id:             toolDrawerLoadercalib
            anchors.left:   parent.left
            anchors.top:    parent.top
            anchors.right:  parent.right
            Connections {
                target:                 toolDrawerLoadercalib.item
                ignoreUnknownSignals:   true
                onPopout:               toolDrawercalibration.visible = false
            }
        }
    }

    //-------------------------------------------------------------------------
    //-- Critical Vehicle Message Popup

    property var    _vehicleMessageQueue:      []
    property string _vehicleMessage:     ""

    function showCriticalVehicleMessage(message) {
        indicatorPopup.close()
        if (criticalVehicleMessagePopup.visible || QGroundControl.videoManager.fullScreen) {
            _vehicleMessageQueue.push(message)
        } else {
            _vehicleMessage = message
            criticalVehicleMessagePopup.open()
        }
    }

    Popup {
        id:                 criticalVehicleMessagePopup
        y:                  ScreenTools.defaultFontPixelHeight
        x:                  Math.round((mainWindow.width - width) * 0.5)
        width:              mainWindow.width  * 0.55
        height:             ScreenTools.defaultFontPixelHeight * 6
        modal:              false
        focus:              true
        closePolicy:        Popup.CloseOnEscape

        background: Rectangle {
            anchors.fill:   parent
            color:          qgcPal.alertBackground
            radius:         ScreenTools.defaultFontPixelHeight * 0.5
            border.color:   qgcPal.alertBorder
            border.width:   2
        }

        onOpened: {
            criticalVehicleMessageText.text = mainWindow._vehicleMessage
        }

        onClosed: {
            //-- Are there messages in the waiting queue?
            if(mainWindow._vehicleMessageQueue.length) {
                mainWindow._vehicleMessage = ""
                //-- Show all messages in queue
                for (var i = 0; i &lt; mainWindow._vehicleMessageQueue.length; i++) {
                    var text = mainWindow._vehicleMessageQueue[i]
                    if(i) mainWindow._vehicleMessage += "&lt;br&gt;"
                    mainWindow._vehicleMessage += text
                }
                //-- Clear it
                mainWindow._vehicleMessageQueue = []
                criticalVehicleMessagePopup.open()
            } else {
                mainWindow._vehicleMessage = ""
            }
        }

        Flickable {
            id:                 criticalVehicleMessageFlick
            anchors.margins:    ScreenTools.defaultFontPixelHeight * 0.5
            anchors.fill:       parent
            contentHeight:      criticalVehicleMessageText.height
            contentWidth:       criticalVehicleMessageText.width
            boundsBehavior:     Flickable.StopAtBounds
            pixelAligned:       true
            clip:               true
            TextEdit {
                id:             criticalVehicleMessageText
                width:          criticalVehicleMessagePopup.width - criticalVehicleMessageClose.width - (ScreenTools.defaultFontPixelHeight * 2)
                anchors.centerIn: parent
                readOnly:       true
                textFormat:     TextEdit.RichText
                font.pointSize: ScreenTools.defaultFontPointSize
                font.family:    ScreenTools.demiboldFontFamily
                wrapMode:       TextEdit.WordWrap
                color:          qgcPal.alertText
            }
        }

        //-- Dismiss Vehicle Message
        QGCColoredImage {
            id:                 criticalVehicleMessageClose
            anchors.margins:    ScreenTools.defaultFontPixelHeight * 0.5
            anchors.top:        parent.top
            anchors.right:      parent.right
            width:              ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 1.5 : ScreenTools.defaultFontPixelHeight
            height:             width
            sourceSize.height:  width
            source:             "/res/XDelete.svg"
            fillMode:           Image.PreserveAspectFit
            color:              qgcPal.alertText
            MouseArea {
                anchors.fill:       parent
                anchors.margins:    -ScreenTools.defaultFontPixelHeight
                onClicked: {
                    criticalVehicleMessagePopup.close()
                }
            }
        }

        //-- More text below indicator
        QGCColoredImage {
            anchors.margins:    ScreenTools.defaultFontPixelHeight * 0.5
            anchors.bottom:     parent.bottom
            anchors.right:      parent.right
            width:              ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 1.5 : ScreenTools.defaultFontPixelHeight
            height:             width
            sourceSize.height:  width
            source:             "/res/ArrowDown.svg"
            fillMode:           Image.PreserveAspectFit
            visible:            criticalVehicleMessageText.lineCount &gt; 5
            color:              qgcPal.alertText
            MouseArea {
                anchors.fill:   parent
                onClicked: {
                    criticalVehicleMessageFlick.flick(0,-500)
                }
            }
        }
    }

    //-------------------------------------------------------------------------
    //-- Indicator Popups

    function showIndicatorPopup(item, dropItem) {
        indicatorPopup.currentIndicator = dropItem
        indicatorPopup.currentItem = item
        indicatorPopup.open()
    }

    function hideIndicatorPopup() {
        indicatorPopup.close()
        indicatorPopup.currentItem = null
        indicatorPopup.currentIndicator = null
    }

    Popup {
        id:             indicatorPopup
        padding:        ScreenTools.defaultFontPixelWidth * 0.75
        modal:          true
        focus:          true
        closePolicy:    Popup.CloseOnEscape | Popup.CloseOnPressOutside
        property var    currentItem:        null
        property var    currentIndicator:   null
        background: Rectangle {
            width:  loader.width
            height: loader.height
            color:  Qt.rgba(0,0,0,0)
        }
        Loader {
            id:             loader
            onLoaded: {
                var centerX = mainWindow.contentItem.mapFromItem(indicatorPopup.currentItem, 0, 0).x - (loader.width * 0.5)
                if((centerX + indicatorPopup.width) &gt; (mainWindow.width - ScreenTools.defaultFontPixelWidth)) {
                    centerX = mainWindow.width - indicatorPopup.width - ScreenTools.defaultFontPixelWidth
                }
                indicatorPopup.x = centerX
            }
        }
        onOpened: {
            loader.sourceComponent = indicatorPopup.currentIndicator
        }
        onClosed: {
            loader.sourceComponent = null
            indicatorPopup.currentIndicator = null
        }
    }
}

</code></pre>
]]></description><link>https://forum.qt.io/post/747126</link><guid isPermaLink="true">https://forum.qt.io/post/747126</guid><dc:creator><![CDATA[serkan_tr]]></dc:creator><pubDate>Fri, 10 Feb 2023 14:39:44 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 14:38:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/serkan_tr">@<bdi>serkan_tr</bdi></a>  QGCApplication.cpp</p>
<pre><code>
class FinishVideoInitialization : public QRunnable
{
public:
  FinishVideoInitialization(VideoManager* manager)
      : _manager(manager)
  {}

  void run () {
      _manager-&gt;_initVideo();
  }

private:
  VideoManager* _manager;
};


QGCApplication* QGCApplication::_app = nullptr;

const char* QGCApplication::_deleteAllSettingsKey           = "DeleteAllSettingsNextBoot";
const char* QGCApplication::_settingsVersionKey             = "SettingsVersion";

// Mavlink status structures for entire app
mavlink_status_t m_mavlink_status[MAVLINK_COMM_NUM_BUFFERS];

// Qml Singleton factories

static QObject* screenToolsControllerSingletonFactory(QQmlEngine*, QJSEngine*)
{
    ScreenToolsController* screenToolsController = new ScreenToolsController;
    return screenToolsController;
}

static QObject* mavlinkSingletonFactory(QQmlEngine*, QJSEngine*)
{
    return new QGCMAVLink();
}

static QObject* qgroundcontrolQmlGlobalSingletonFactory(QQmlEngine*, QJSEngine*)
{
    // We create this object as a QGCTool even though it isn't in the toolbox
    QGroundControlQmlGlobal* qmlGlobal = new QGroundControlQmlGlobal(qgcApp(), qgcApp()-&gt;toolbox());
    qmlGlobal-&gt;setToolbox(qgcApp()-&gt;toolbox());

    return qmlGlobal;
}

static QObject* shapeFileHelperSingletonFactory(QQmlEngine*, QJSEngine*)
{
    return new ShapeFileHelper;
}

QGCApplication::QGCApplication(int &amp;argc, char* argv[], bool unitTesting)
    : QApplication          (argc, argv)
    , _runningUnitTests     (unitTesting)
{
    _app = this;
    _msecsElapsedTime.start();

#ifdef Q_OS_LINUX
#ifndef __mobile__
    if (!_runningUnitTests) {
        if (getuid() == 0) {
            _exitWithError(QString(
                tr("You are running %1 as root. "
                    "You should not do this since it will cause other issues with %1."
                    "%1 will now exit.&lt;br/&gt;&lt;br/&gt;"
                    "If you are having serial port issues on Ubuntu, execute the following commands to fix most issues:&lt;br/&gt;"
                    "&lt;pre&gt;sudo usermod -a -G dialout $USER&lt;br/&gt;"
                    "sudo apt-get remove modemmanager&lt;/pre&gt;").arg(qgcApp()-&gt;applicationName())));
            return;
        }
        // Determine if we have the correct permissions to access USB serial devices
        QFile permFile("/etc/group");
        if(permFile.open(QIODevice::ReadOnly)) {
            while(!permFile.atEnd()) {
                QString line = permFile.readLine();
                if (line.contains("dialout") &amp;&amp; !line.contains(getenv("USER"))) {
                    permFile.close();
                    _exitWithError(QString(
                        tr("The current user does not have the correct permissions to access serial devices. "
                           "You should also remove modemmanager since it also interferes.&lt;br/&gt;&lt;br/&gt;"
                           "If you are using Ubuntu, execute the following commands to fix these issues:&lt;br/&gt;"
                           "&lt;pre&gt;sudo usermod -a -G dialout $USER&lt;br/&gt;"
                           "sudo apt-get remove modemmanager&lt;/pre&gt;")));
                    return;
                }
            }
            permFile.close();
        }

        // Always set style to default, this way QT_QUICK_CONTROLS_STYLE environment variable doesn't cause random changes in ui
        QQuickStyle::setStyle("Default");
    }
#endif
#endif

    // Setup for network proxy support
    QNetworkProxyFactory::setUseSystemConfiguration(true);

    // Parse command line options

    bool fClearSettingsOptions = false; // Clear stored settings
    bool fClearCache = false;           // Clear parameter/airframe caches
    bool logging = false;               // Turn on logging
    QString loggingOptions;

    CmdLineOpt_t rgCmdLineOptions[] = {
        { "--clear-settings",   &amp;fClearSettingsOptions, nullptr },
        { "--clear-cache",      &amp;fClearCache,           nullptr },
        { "--logging",          &amp;logging,               &amp;loggingOptions },
        { "--fake-mobile",      &amp;_fakeMobile,           nullptr },
        { "--log-output",       &amp;_logOutput,            nullptr },
        // Add additional command line option flags here
    };

    ParseCmdLineOptions(argc, argv, rgCmdLineOptions, sizeof(rgCmdLineOptions)/sizeof(rgCmdLineOptions[0]), false);

    // Set up timer for delayed missing fact display
    _missingParamsDelayedDisplayTimer.setSingleShot(true);
    _missingParamsDelayedDisplayTimer.setInterval(_missingParamsDelayedDisplayTimerTimeout);
    connect(&amp;_missingParamsDelayedDisplayTimer, &amp;QTimer::timeout, this, &amp;QGCApplication::_missingParamsDisplay);

    // Set application information
    QString applicationName;
    if (_runningUnitTests) {
        // We don't want unit tests to use the same QSettings space as the normal app. So we tweak the app
        // name. Also we want to run unit tests with clean settings every time.
        applicationName = QStringLiteral("%1_unittest").arg(QGC_APPLICATION_NAME);
    } else {
#ifdef DAILY_BUILD
        // This gives daily builds their own separate settings space. Allowing you to use daily and stable builds
        // side by side without daily screwing up your stable settings.
        applicationName = QStringLiteral("%1 Daily").arg(QGC_APPLICATION_NAME);
#else
        applicationName = QGC_APPLICATION_NAME;
#endif
    }
    setApplicationName(applicationName);
    setOrganizationName(QGC_ORG_NAME);
    setOrganizationDomain(QGC_ORG_DOMAIN);

    this-&gt;setApplicationVersion(QString(APP_VERSION_STR));

    // Set settings format
    QSettings::setDefaultFormat(QSettings::IniFormat);
    QSettings settings;
    qDebug() &lt;&lt; "*******Settings location" &lt;&lt; settings.fileName() &lt;&lt; "Is writable?:" &lt;&lt; settings.isWritable();

#ifdef UNITTEST_BUILD
    if (!settings.isWritable()) {
        qWarning() &lt;&lt; "Setings location is not writable";
    }
#endif
    // The setting will delete all settings on this boot
    fClearSettingsOptions |= settings.contains(_deleteAllSettingsKey);

    if (_runningUnitTests) {
        // Unit tests run with clean settings
        fClearSettingsOptions = true;
    }

    if (fClearSettingsOptions) {
        // User requested settings to be cleared on command line
        settings.clear();

        // Clear parameter cache
        QDir paramDir(ParameterManager::parameterCacheDir());
        paramDir.removeRecursively();
        paramDir.mkpath(paramDir.absolutePath());
    } else {
        // Determine if upgrade message for settings version bump is required. Check and clear must happen before toolbox is started since
        // that will write some settings.
        if (settings.contains(_settingsVersionKey)) {
            if (settings.value(_settingsVersionKey).toInt() != QGC_SETTINGS_VERSION) {
                settings.clear();
                _settingsUpgraded = true;
            }
        }
    }
    settings.setValue(_settingsVersionKey, QGC_SETTINGS_VERSION);

    if (fClearCache) {
        QDir dir(ParameterManager::parameterCacheDir());
        dir.removeRecursively();
        QFile airframe(cachedAirframeMetaDataFile());
        airframe.remove();
        QFile parameter(cachedParameterMetaDataFile());
        parameter.remove();
    }

    // Set up our logging filters
    QGCLoggingCategoryRegister::instance()-&gt;setFilterRulesFromSettings(loggingOptions);

    // Initialize Bluetooth
#ifdef QGC_ENABLE_BLUETOOTH
    QBluetoothLocalDevice localDevice;
    if (localDevice.isValid())
    {
        _bluetoothAvailable = true;
    }
#endif

    // Gstreamer debug settings
    int gstDebugLevel = 0;
    if (settings.contains(AppSettings::gstDebugLevelName)) {
        gstDebugLevel = settings.value(AppSettings::gstDebugLevelName).toInt();
    }

#if defined(QGC_GST_STREAMING)
    // Initialize Video Receiver
    GStreamer::initialize(argc, argv, gstDebugLevel);
#else
    Q_UNUSED(gstDebugLevel)
#endif

    // We need to set language as early as possible prior to loading on JSON files.
    setLanguage();

    _toolbox = new QGCToolbox(this);
    _toolbox-&gt;setChildToolboxes();

#ifndef __mobile__
    _gpsRtkFactGroup = new GPSRTKFactGroup(this);
   GPSManager *gpsManager = _toolbox-&gt;gpsManager();
   if (gpsManager) {
       connect(gpsManager, &amp;GPSManager::onConnect,          this, &amp;QGCApplication::_onGPSConnect);
       connect(gpsManager, &amp;GPSManager::onDisconnect,       this, &amp;QGCApplication::_onGPSDisconnect);
       connect(gpsManager, &amp;GPSManager::surveyInStatus,     this, &amp;QGCApplication::_gpsSurveyInStatus);
       connect(gpsManager, &amp;GPSManager::satelliteUpdate,    this, &amp;QGCApplication::_gpsNumSatellites);
   }
#endif /* __mobile__ */
    _checkForNewVersion();
}

</code></pre>
<p dir="auto">Just step the constructor part because the code is too long</p>
]]></description><link>https://forum.qt.io/post/747125</link><guid isPermaLink="true">https://forum.qt.io/post/747125</guid><dc:creator><![CDATA[serkan_tr]]></dc:creator><pubDate>Fri, 10 Feb 2023 14:38:59 GMT</pubDate></item><item><title><![CDATA[Reply to How to make full screen on Fri, 10 Feb 2023 14:34:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/serkan_tr">@<bdi>serkan_tr</bdi></a>  main.cpp</p>
<pre><code>
int main(int argc, char *argv[])
{

    rclcpp::init(argc, argv);
    #ifndef __mobile__
        QString runguardString(QGC_APPLICATION_NAME);
        runguardString.append("RunGuardKey");

        RunGuard guard(runguardString);
        if (!guard.tryToRun()) {
            // QApplication is necessary to use QMessageBox
            QApplication errorApp(argc, argv);
            QMessageBox::critical(nullptr, QObject::tr("Error"),
                QObject::tr("A second instance of %1 is already running. Please close the other instance and try again.").arg(QGC_APPLICATION_NAME)
            );
            return -1;
        }
    #endif

        //-- Record boot time
        QGC::initTimer();

    #ifdef Q_OS_UNIX
        //Force writing to the console on UNIX/BSD devices
        if (!qEnvironmentVariableIsSet("QT_LOGGING_TO_CONSOLE"))
            qputenv("QT_LOGGING_TO_CONSOLE", "1");
    #endif

        // install the message handler
        AppMessages::installHandler();



    #ifdef Q_OS_WIN
        // Set our own OpenGL buglist
        qputenv("QT_OPENGL_BUGLIST", ":/opengl/resources/opengl/buglist.json");

        // Allow for command line override of renderer
        for (int i = 0; i &lt; argc; i++) {
            const QString arg(argv[i]);
            if (arg == QStringLiteral("-angle")) {
                QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
                break;
            } else if (arg == QStringLiteral("-swrast")) {
                QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
                break;
            }
        }
    #endif


    #ifndef NO_SERIAL_LINK
        qRegisterMetaType&lt;QSerialPort::SerialPortError&gt;();
    #endif
    #ifdef QGC_ENABLE_BLUETOOTH
        qRegisterMetaType&lt;QBluetoothSocket::SocketError&gt;();
        qRegisterMetaType&lt;QBluetoothServiceInfo&gt;();
    #endif
        qRegisterMetaType&lt;QAbstractSocket::SocketError&gt;();
        qRegisterMetaType&lt;Vehicle::MavCmdResultFailureCode_t&gt;("Vehicle::MavCmdResultFailureCode_t");

        // We statically link our own QtLocation plugin

    #ifdef Q_OS_WIN
        // In Windows, the compiler doesn't see the use of the class created by Q_IMPORT_PLUGIN
    #pragma warning( disable : 4930 4101 )
    #endif

    Q_IMPORT_PLUGIN(QGeoServiceProviderFactoryQGC)

    bool runUnitTests = false;          // Run unit tests


    QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
    QGCApplication* app = new QGCApplication(argc, argv, runUnitTests);
    Q_CHECK_PTR(app);
    if(app-&gt;isErrorState()) {
        app-&gt;exec();
        return -1;
    }

    // #ifdef Q_OS_LINUX

    QApplication::setWindowIcon(QIcon(":/res/resources/icons/qgroundcontrol.ico"));
    getQGCMapEngine()-&gt;init();
    qRegisterMetaType&lt;QList&lt;QPair&lt;QByteArray,QByteArray&gt; &gt; &gt;();
    app-&gt;_initCommon();

    int exitCode = 0;
    {
    #ifdef UNITTEST_BUILD
        if (runUnitTests) {
            for (int i=0; i &lt; (stressUnitTests ? 20 : 1); i++) {
                if (!app-&gt;_initForUnitTests()) {
                    return -1;
                }

                // Run the test
                int failures = UnitTest::run(unitTestOptions);
                if (failures == 0) {
                    qDebug() &lt;&lt; "ALL TESTS PASSED";
                    exitCode = 0;
                } else {
                    qDebug() &lt;&lt; failures &lt;&lt; " TESTS FAILED!";
                    exitCode = -failures;
                    break;
                }
            }
        } else
    #endif
    }

    {

    #ifdef __android__
            checkAndroidWritePermission();
    #endif
        if (!app-&gt;_initForNormalAppBoot()) {
            return -1;
        }
        exitCode = app-&gt;exec();
    }

    app-&gt;_shutdown();
    delete app;
    //-- Shutdown Cache System
    destroyMapEngine();

    rclcpp::shutdown();

    qDebug() &lt;&lt; "After app delete";
    return exitCode;
}

</code></pre>
]]></description><link>https://forum.qt.io/post/747123</link><guid isPermaLink="true">https://forum.qt.io/post/747123</guid><dc:creator><![CDATA[serkan_tr]]></dc:creator><pubDate>Fri, 10 Feb 2023 14:34:25 GMT</pubDate></item></channel></rss>