showMinimized() not working on mac os.. ...
-
Can you post more of your code?
-
@integer showMinimized() is working as expected here on macOS 12.5.1 Apple M1 with Qt 6.4b4
-
- Create a new Qt GUI application;
- Set window flags of main window like following:
this->setWindowFlags(Qt::FramelessWindowHint); - Invoke showMinimized() method by any means, the main window doesn't minimize itself after that.
Regards,
james -
Qt::FramelessWindowHint
translates intoNSWindowStyleMaskBorderless
on macOS.
Borderless windows not minimizing programmatically, is known behavior on macOS. It's arguable if that behavior is a bug or a feature: A frameless window has no handles for the user to show/hide/maximize it. So if minimized programmatically, the user cannot interact with it any more. Popup windows are typical frameless/borderless use cases.
Having said that,showMinimized()
works on macOS, unlessQt::FramelessWindowHint
is set and/or the window is a popup.