[Interest] macOS: FullScreen window can't be hidden

Alexander Dyagilev alervdvcw at gmail.com
Sat Aug 21 09:06:54 CEST 2021


Hello,

When my app's main window is in full screen mode, I would like the close 
button to just hide it instead of closing window.

But there is bug (qt bug?): hiding the window does not make it exit full 
screen mode.

Here the bug report I've created: 
https://bugreports.qt.io/browse/QTBUG-95947

Is there any workaround?

Code:

import  QtQuick 2.12
import  QtQuick.Window 2.12

Window
{
     width: 640
     height: 480
     visible:true
     title: qsTr("Hello World")
     Component.onCompleted: flags |= Qt.WindowFullscreenButtonHint
     onClosing:
     {
         if  (visibility == Window.FullScreen)
         {
             visibility = Window.Hidden;
             close.accepted =false;
         }
     }
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210821/7f13e18c/attachment.html>


More information about the Interest mailing list