Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] How to block vertical size of a QWidget on Windows.
I made a QWidget and I'd like to block the vertical size.
I tried many things like:
But nothing work correctly: I can always "resize" vertically the widget. I also tried to add a layout and fixed the size but I have the same result.
What did I do wrong?
For information, I use Qt 5.1.1.
Is "setFixedHeight":http://qt-project.org/doc/qt-5/qwidget.html#setFixedHeight what you are looking for ?
I tried this too but it doesn't work.
Jeroentjehome last edited by
Did you set the sizePolicy to fixed?
And also set the sizeHint value?
I tried too but no success...
In the documentation, I read this about minimumSizeHint:
@If minimumSize() is set, the minimum size hint will be ignored.@
So I didn't overwrite it yet.
I just figure that maybe my components inside my widget are bigger than my minimum height... so my problem is quite normal, isn't it?
Edit: I change the minimum size of my widget, and every thing work now!