November 25, 2010

liangjingmenghua liangjingmen..
Lab Rat
3 posts

[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.

4 replies

November 25, 2010

Tobias Hunger Tobias Hunger
Robot Herder
3386 posts

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.

November 25, 2010

liangjingmenghua liangjingmen..
Lab Rat
3 posts

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.

November 25, 2010

Volker Volker
Ant Farmer
5428 posts

On the right side of the property, there is a red arrow, click it to reset the property to its default value.

November 25, 2010

liangjingmenghua liangjingmen..
Lab Rat
3 posts

Yes, I found it, and it works.
Thank you very much!!
I think I can have a good sleep tonight:-)

 
  ‹‹ Many Processes one GUI      [SOLVED]Space between widgets ( added to QSplitter ) ››

You must log in to post a reply. Not a member yet? Register here!