[SOLVED] How to resize a window to it's minimum when launched?
-
So i have this ui in my designer:
!http://i.imgur.com/mlGg5.png(ui)!
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:!http://i.imgur.com/Xhhb4.png(height)!
!http://i.imgur.com/ypj9j.png(width)!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?
-
Anyone? :/
-
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 :)
-
Yeah, simple put this code into your constructor after setupUi() or put it into the showEvent():
@resize(this->minimumSize());@ -
Thank you
@ resize(this->minimumSize());@
works for me :)