Qt 4.8 based, application - Issue with QDialog, minimize button
Windows and Gnome (linux)
But here comes the issue:
It seems that this is a platform dependent feature -
I am not quite sure on what do do.
Any ideas...? (I tried already with a few windowsFlags but could not find the one set that works.
Tried:
--- But the basic question is why the behavior on Windows/GNOME is different from KDE
To turn off the Maximize Button on the default windows, set the max size of your Window on your Ui file. You will notice the Maximize button is greyed out when you run your program.
To remove the minimize, maximize, and close buttons from your form, open your form in Design View. Under the View menu, select Properties. When the Properties window appears, set the "Control Box" property to "No". Now when the form is opened, the buttons will no longer appear in the top right of the form.
Alternatively called a collapse box, minimize box, and minimize button, minimize is an action in GUI operating systems to hide a window, but keep the program running in the background.
if you want the MainWindow don't have any buttons on top use this in constructor of MainWindow:
this->setWindowFlags(Qt::SubWindow);
and if you want to remove just the minimize button use this:
this->setWindowFlags(Qt::Dialog);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With