Results 1 to 3 of 3

Thread: Expandable Layout

  1. #1

    Default Expandable Layout

    I'm pretty new to QT. I feel like this is likely a simple question.

    I've created a MainWindow (using QT Designer 4.2.2) which contains a number of widgets including TabWidgets containing labels and progress bars, a group box containing radio buttons, sliders, lineEdits, etc. I would like the window to rescale in a gracefull way. E.g. the sliders, progress bars would scale as the window grows and shrinks, but the lineEdits, labels, and distance between the radio buttons would remain constant.

    As I have the layout currently, nothing scales (expands or compresses). I've selecting all objects (ctl-a) and layed them out in a grid, but that also results in none of the widgets scaling as I had hoped.

    Any advice would be much appreciated.


  2. #2
    Join Date
    Feb 2006
    Oslo, Norway
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Expandable Layout

    You are missing a top level layout. Deselect all widgets, open up context menu over the background of the form, and select a layout from there.
    J-P Nurmi

  3. #3

    Default Re: Expandable Layout

    Thanks, that was extremely useful.

    As a note to those who may be experiencing similar issues, if you have TabWidget that have items you want to expand appropriately, you must go to each tab, select the background and choose layout as grid. After you have layed out each tab in your TabWidgets, you must then select the background of the MainWindow and layout items in a grid.

    Thanks again for your help.


Similar Threads

  1. changing layout of a widget
    By mikro in forum Qt Programming
    Replies: 10
    Last Post: 4th August 2009, 20:21
  2. QtDesigner Layout Help
    By mentat in forum Qt Tools
    Replies: 5
    Last Post: 13th July 2006, 14:55
  3. Layout issues
    By vijay anandh in forum Qt Programming
    Replies: 2
    Last Post: 8th July 2006, 19:27
  4. "dynamic" layout
    By hulk in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2006, 07:16
  5. QT4 layout of complex dialog is very slow
    By cboles in forum Qt Programming
    Replies: 15
    Last Post: 28th April 2006, 19:57


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.