[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:
1. Double Click the mainwindow.ui and go to the Qt designer
2. Right Click the center widget which is actually the QTextEdit, and choose the item “Size constraints”,
3. 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.