Results 1 to 3 of 3

Thread: QLayout and the size of the widget

  1. #1
    Join Date
    Dec 2007
    Posts
    15
    Qt products
    Qt4 Qt/Embedded

    Default QLayout and the size of the widget

    I have a widget that uses a grid layout, after adding the child widgets into the layout, it seems that I have to manually calculate the size of the main widget for the minimum size, otherwise the main widget won't be displayed. This doesn't make too much sense and I must be missing something here. Can anyone help me with this problem?

    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: QLayout and the size of the widget

    Perhaps you forgot to actually set the layout on the "main widget"?
    J-P Nurmi

  3. #3
    Join Date
    Dec 2007
    Posts
    15
    Qt products
    Qt4 Qt/Embedded

    Default Re: QLayout and the size of the widget

    No I did set the widget layout to this layout.

    Right now I am using QLayout::minimumSize to get the layout minimum size and set it as the minimum size of the widget, that works. But I guess it's not supposed to be like this right?

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.