[Solved] I couldn't make my application maximum after I set the maximum size through Qt Designer
-
I have been learning Qt for several weeks and I just created a text editor followed by the lab exercise.
Everything go well until I did a stupid action, that is:- Double Click the mainwindow.ui and go to the Qt designer
- Right Click the center widget which is actually the QTextEdit, and choose the item "Size constraints",
- Click the Item "Set Maximum Size"
Then the problem occurred, I couldn't make the application maximum any more.
The icon is disabled that I couldn't click to maximize.
And I tried to set the window flags, but it didn't work.
Please help me to figure out why and how to fix, Thanks.
-
Any widget with a maximum size set will never get bigger than that size. I guess you set a size that is smaller than the widget would need to get when the application is maximized... so maximization is not an option anymore and the button gets disabled.
Just reset the maximum size again and the button should get enabled again.
-
Thanks ,but could you please tell me detail how to reset?
I tried to change the maximumSize property from property window, but it still not work. -
Yes, I found it, and it works.
Thank you very much!!
I think I can have a good sleep tonight:-)