Results 1 to 3 of 3

Thread: Add borders to QGridlayout

  1. #1
    Join Date
    Mar 2014
    Posts
    15
    Thanks
    1
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Add borders to QGridlayout

    Hi
    I want to add border to QGridLayout.
    How to do that.
    Thanks.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Add borders to QGridlayout

    A QGridLayout is not a visible object, it cannot have borders of its own. You can put a set of widgets laid out by QGridLayout inside a QFrame to get a visible border.

  3. #3
    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: Add borders to QGridlayout

    And in case you meant just some spacing between the layout's content and the layout's parent, see QLayout::setMargin() and QLayout::setContentsMargins()

    Cheers,
    _

Similar Threads

  1. buttons on frame borders
    By iori in forum Qt Programming
    Replies: 1
    Last Post: 19th May 2011, 08:30
  2. widget borders v4.2
    By dacrawler in forum Newbie
    Replies: 0
    Last Post: 24th January 2011, 19:08
  3. QGroupBox borders
    By onurozcelik in forum Qt Programming
    Replies: 0
    Last Post: 27th August 2010, 06:24
  4. Groupbox has no borders ?
    By vieraci in forum Qt Programming
    Replies: 12
    Last Post: 30th April 2009, 12:46
  5. Delete a QGridLayout and New QGridLayout at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 5th November 2007, 13:01

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.