Results 1 to 2 of 2

Thread: QGridLayout - Stop stretching

  1. #1
    Join Date
    Aug 2010
    Posts
    30
    Thanks
    2

    Default QGridLayout - Stop stretching

    I have a couple of tabs that contain a QGridLayout with some widgets. One of the tabs is a little bigger than the other tabs in QTabWidget (more QLineEdits and labels). This causes the rows and columns on the other tabs to stretch.
    1.png
    2.png

    I don't want the layout to stretch like this i.e. fixed spacing. I've tried setting some of the QGridLayout properties in order to stop the layout from stretching but none have them have worked.

    Setting the max size of the tab does stop the QGridLayout from stretching, but I was wondering if there's another way to do this as the results are a little ugly?

    Thanks

  2. #2
    Join Date
    May 2010
    Posts
    61
    Thanks
    2
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QGridLayout - Stop stretching

    Did you try to add some Spacers? QSpacerItem
    Wladek.
    One second is long, everything longer than two seconds is definitely too long.

Similar Threads

  1. QwtPlot stretching
    By jmsbc in forum Qwt
    Replies: 7
    Last Post: 27th August 2013, 07:43
  2. No scrollbars or stretching in QToolBox
    By zenzero-2001 in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2010, 14:51
  3. Dockwidget stretching
    By jayreddy in forum Qt Programming
    Replies: 0
    Last Post: 6th November 2009, 15:37
  4. Delete a QGridLayout and New QGridLayout at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 5th November 2007, 13:01
  5. Stretching Icon in QPushButton
    By dsandber in forum Qt Tools
    Replies: 1
    Last Post: 6th October 2007, 16:51

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.