Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
QtCreator 5.2.1 and 5.3 wont let QMainWindow object resize smaller
ProfRivkin last edited by
I am working with a UI file that is rather large. It has everything in stacks of layout done properly. I can easily scale up the entire application but scaling it down to the size I need for the fixed size display I am working with. Every time I set the QMainWindows' dimensions to what I want, it changes them to something else larger. I have changed to every optional SizePolicy available and just get different minimum sizes. Not one Widget in the entire UI file has a MinimumSize property set (I double checked that I had removed them all), and I use SizePolicies of Preferred for just about everything.
Any thoughts on what would force the size of the MainWindow to be some minimum size against my wishes?
BlastDV last edited by
Hi ProfRivkin, I think it would be better if you post a picture of your window and then we can see it more clearly..
Anyway, do you want your widgets to be any size by scaling you Window? Or do you want it to have a maximum and a minimum size? If so, try to set a maximum size for them so they won't be any larger and a minimum for the opposite effect. Also, take into consideration that if you are using frames or even some widgets, they have a margin value that indicates the minimum space between the border of the object and the content itself.. I often set those to 1 (Up, left, down and right) so everything looks smaller.
What is happening to you may be because they come at 9 from default, so they can't get any smaller no matter how much you try to scale your window.