Here someone was trying to resolve this issue and did not succeed:
https://stackoverflow.com/questions/28892696/qwidget-will-not-close-in-full-screen-mode-on-os-x-yosemite

All the issues he described there still exists.

On 8/21/2021 10:06 AM, Alexander Dyagilev wrote:

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;
         }
     }
}
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to