Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
How to hide MaximizeButton of QMainWindow?
This do not work:
setWindowFlags(windowFlags() &~ Qt::WindowMaximizeButtonHint);
setWindowFlags( Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint );
@raven-worx This can disable maximize button but not hide it !
i think there is no Qt-way to remove the minimize and maximize buttons.
You may want to set the
Qt::Toolflag instead the
setWindowFlags( Qt::Tool );
But this also changes the appearance and behavior of the window a bit. But tool-windows do not have minimize and maximize buttons but do also not appear in the taskbar.
@raven-worx setFixedSize is more simple than setWindowFlags, but also disable Maximize button no hide it.
If Qt::Tool is not what you want, i think disable it is the only options.
It will not be hidden unless a Tool type.
SaaGar last edited by SaaGar
this helped me: Form.setMaximumSize(QtCore.QSize(width, height))
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(328, 212) Form.setMaximumSize(QtCore.QSize(352, 189))
YTech last edited by
This post is deleted!