Results 1 to 2 of 2

Thread: Docking a widget to fill a dialog

  1. #1
    Join Date
    Nov 2006
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Docking a widget to fill a dialog

    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

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Docking a widget to fill a dialog

    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.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    mridey (16th November 2006)

Similar Threads

  1. Replies: 4
    Last Post: 25th August 2014, 18:05
  2. Previewing a stack widget dialog
    By mikeh in forum Qt Tools
    Replies: 4
    Last Post: 2nd October 2006, 10:19
  3. QDialog::exec() cereates no modal dialog
    By sboesch in forum Qt Programming
    Replies: 8
    Last Post: 27th March 2006, 17:03
  4. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.