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

  • Moderators

    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.



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



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.