I want to disable maximize button in the Qt
I tried
setWindowFlags( (windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint);
I want to disable maximize button in the Qt
I tried
setWindowFlags( (windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint);
SetWindowsFlags(); didn't work for me on Ubuntu 16.04,but under ui->setupUi(this) I added this line:
setFixedSize(width(), height());
and it works fine.
To turn off the Maximize Button on the default windows, set the max size of your Window on your Ui file.
For example:
You will notice the Maximize button is greyed out when you run your program.
If you want your window to ever only be the one size and give the user no control to change it, set the Geometry and the Minimum size to these same values.