Half-resizable window
-
Hello everyone,
I'm working on a main window. I want the user to be allowed to resize it vertically, but not horizontally.
The fisrt idea I got was to put :
resize(630, 380);
setFixedWidth (630);
in the constructor but it automatically disable the resize buton of the title bar (between close and reduce)
Is it possible to impose an horizontal size but let this auto-resize option available verticaly? -
But it makes perfect sense that that disables the maximize button. If you limit the size to a specific width, you can not resize it to fill the screen (what the maximize button does). It would be confusing to the user if you have a maximize button, that does not actually maximize the window.
-
Seems like someone dictates that a window with a maximum widht or height should have a disabled maximize button. Not sure if it's Qt or Windows, though. If it's Qt you might be able to get around it, if it's Windows, it might be more difficult (at least using Qt code - you might find something in the Windows APIs).
The fact that doing
@w.setWindowFlags(w.windowFlags() | Qt::WindowMaximizeButtonHint);@
on a window does not bring the maximize button back to enabled probably means that it is Windows, not Qt, that dictates this. -
-