Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.14.2
-
None
-
macOS 10.15.6
Description
I'm trying to implement a Window menu that provides some standard menu items like Minimize and Zoom. If a window is not minimized, my code tries to minimize it by doing:
activeWindow->setWindowState(activeWindow->windowState() | Qt::WindowMinimized);
I'm surprised to discover that, for some windows in my app, this results in a console log that says "Qt::Tool windows cannot be made Qt::WindowMinimized". This is strange, because these same windows have a minimize button in their title bar, and clicking that button does indeed minimize them to my macOS Dock. I just want to reproduce the same behavior with a menu item with a command-M shortcut, as is standard on macOS. Why does setWindowState() refuse to do it, given that it is otherwise possible? Is there a workaround?