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

Alexander Dyagilev alervdvcw at gmail.com
Sat Aug 21 09:19:00 CEST 2021


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;
>          }
>      }
> }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210821/59982678/attachment.html>


More information about the Interest mailing list