Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] How to resize a window to it's minimum when launched?
So i have this ui in my designer:
But because as you know Ubuntu menubar of applications doesn't appear in the window of the application but in the panel..
So i am able after the launch of the application to make the window smaller:
I would like my window after the launch to be at it's minimum.. one solution i could only think is like say resize (1x1) and because obviously the minimum is bigger than 1x1 it will then resize it to it's minimum.. What do you say?
marsupial last edited by
You can use QWidget::minimumSizeHint() to receive the minimum size and then set this size manually, but it should come down to the same result as setting a size of 1x1 :)
MuldeR last edited by
Yeah, simple put this code into your constructor after setupUi() or put it into the showEvent():
works for me :)