Yes, you need to apply a layout on the dialog object itself.
Yes, you need to apply a layout on the dialog object itself.
sorry , which layout can i use , please explain me?
Thanks,
Rajesh.S
Whichever one you want. All subclasses of QLayout are for you to use.
i am using designer to desing dialog , i have applied horizontal layout , still only my dialog is expanding not all other objects, is there any other properties we need to set for QDialog ?
Thanks,
Rajesh.S
Did you apply a layout to the form itself? You do this by clicking on the form outside any child widgets and then clicking on one of the layout icons. All widgets should then snap in place and resizing the form should cause all child widgets to be resized as well.
If I apply Layout my controls positions and dialog size is increased , how to apply Layout without losing dialog size and controls positions.
Thanks,
Rajesh.S
Layouts can be nested. You can also add spacers and set size policies of widgets. All that together should allow you to obtain positioning you need.
can u explain wich layout can we use with spacers?
Thanks,
Rajesh.S
Any layout can be used with spacers. Insert a spacer on the form in the desired position and wrap it into a layout together with the widgets.
i used Layouts , itried vertical , horizantal and grid layouts,
in vertivcal layout In runtime if i resize my dialog horizontally its not expanding controls width,
in horizontall layout if i resize my dialiog vertically its not expoanding contols height
If i resize my form my controls height and width should be resized accordingly , how to achieve this ?
Thanks,
Rajesh.S
Would you mind reading the document I gave link to? Pay attention to section where it says something about size policies and stretch factors.
J-P Nurmi
Bookmarks