PDA

View Full Version : Docking a widget to fill a dialog



mridey
16th November 2006, 12:41
Very simple question: How do I create a form with a single Textbox widget that takes the whole dialog and resizes when the form resizes.

I read a bit on layouts. but in the designer for a start I can't create a Grid layout with a single textbox. So I added a second textbox, created a grid layout, then deleted the second textbox. Still it didn't help.

So please, how do I place a single textbox in a form and get it to resize as the form resizes. Just say like notepad ...

BTW my problem is a bif more complex than just recreating Notepad, the object I really want to strech is a QAxWidget but answering the question with a Textbox may be easier.

Thanks

jpn
16th November 2006, 12:45
Open context menu over the window's background and select "Lay out->Lay out ...".

Edit: the same actions are reachable also from the "Form"-menu in the menubar.
Layouts can be nested in any way you want. You need a "top level layout" to make the contents follow widget's geometries.