Results 1 to 2 of 2

Thread: Grid vs GridLayout

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Grid vs GridLayout

    Hello Forum,

    Can any one describe the differences between Grid and GridLayout ? The documentation along with small code snippets was not clear enough to me .

    When to use which one ?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Grid vs GridLayout

    Grid is a Positioner, it will arrange its children according to its filling scheme/direction.

    GridLayout does also arrange its children but you can position elements where you want, make them span columns and/or rows.

    The Grid is usually used as a composition, it is a new element that is made of smaller elements, i.e. its size is determined by the children and it has to be positioned into the parent.

    The GridLayout is usually used to fill a parent item with sub items, i.e. its size is determined by the parent and it fits the children into that space.

    But there are a lot of cases where one can use either.

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 4th September 2014, 11:09
  2. How to clear the GridLayout
    By rahulgogoi in forum Qt Programming
    Replies: 7
    Last Post: 13th May 2011, 06:22
  3. Widget layout in GridLayout
    By Dato0011 in forum Qt Programming
    Replies: 8
    Last Post: 7th December 2009, 09:26
  4. QMdiArea with Gridlayout
    By ericV in forum Qt Programming
    Replies: 0
    Last Post: 14th September 2009, 11:26
  5. does gridlayout really lay out?
    By illuzioner in forum Newbie
    Replies: 2
    Last Post: 26th February 2006, 00:57

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
  •  
Qt is a trademark of The Qt Company.