Qt tool window resizable on Mac
-
29-09-2019 - |
Question
I have a Qt window with the following flags:
Qt::CustomizeWindowHint
|Qt::Tool
|Qt::WindowCloseButtonHint
|Qt::WindowTitleHint
|Qt::MSWindowsFixedSizeDialogHint
On Mac, it has a resizable corner. How can I get rid of it? Specifying
setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
does not help. In fact, with the fixed-size policy the window acts weird when I try to resize - it disappears from foreground and becomes disabled for some reason.
I don't mind dropping to the native API level.
Solution
This is in the Qt FAQ.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow