[Qt-interest] Qt 4.7.2 Minimum size persists after being switched off

tony.rietwyk at rightsoft.com.au tony.rietwyk at rightsoft.com.au
Thu May 12 03:32:25 CEST 2011


Hi Everybody, 

I have a form with a label that has a minimum size set.  In some circumstances, after loading the form, I reduce the minimum size values and then call AdjustSize on the form.  The form does not reduce in size.  The behaviour even occurs in Designer, as well as at runtime.  To reproduce in Designer: 

- Open designer
- Create dialog without buttons
- Place label on the dialog
- Add a vertical layout to the dialog
- Do adjust size on the form - it goes quite small, as expected. 

- Select the label and set the minimum width to 400
- Do adjust size on the form - it goes wide as expected
- Save the form. 

- Select the label and click the reset button on the minimum size property
- Do adjust size on the form - it goes small as expected. 
- Close the form and discard changes. 

- Open the saved form (with the minimum size still set). 
- Select the label and click the reset button on the minimum size property
- Do adjust size on the form - it stays the same size! 
- Try to resize the form by dragging the borders - 400 minimum width is still active! 

- Save the form
- Close and reopen the form (without the minimum set)
- Form opens at 400 wide
- Do adjust size on the form - it goes small as expected. 

What can I call besides AdjustSize to get the layout to behave after changing minimum sizes at runtime? 

Thanks, 

Tony




More information about the Qt-interest-old mailing list