Results 1 to 4 of 4

Thread: Handle Spacing on Gridlayout with hidden elements

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2017
    Posts
    9
    Thanks
    3

    Default Handle Spacing on Gridlayout with hidden elements

    Hello,

    I am using a GridLayout (QT 4.8.7) and on certain actions i hide/show parts inside this layout using .hide()/.show().



    The Problem which now occurs is that the spacing of these hidden elements is still shown inside the layout (see picture).

    Screenshot 2017-08-18 09.47.26.png
    Qt Code:
    1. layout = new QGridLayout( this );
    2. layout->setMargin( 1 );
    3. layout->setSpacing( 1 );
    4.  
    5. setSizePolicy( sizePolicy().horizontalPolicy(), QSizePolicy::Fixed );
    To copy to clipboard, switch view to plain text mode 

    Is there a simple way to prevent this behaviour?
    Last edited by PeterSilie; 18th August 2017 at 10:35.

Similar Threads

  1. Replies: 8
    Last Post: 9th December 2016, 00:03
  2. Replies: 2
    Last Post: 2nd May 2016, 08:56
  3. How to clear the GridLayout
    By rahulgogoi in forum Qt Programming
    Replies: 7
    Last Post: 13th May 2011, 07:22
  4. QMdiArea with Gridlayout
    By ericV in forum Qt Programming
    Replies: 0
    Last Post: 14th September 2009, 12:26
  5. does gridlayout really lay out?
    By illuzioner in forum Newbie
    Replies: 2
    Last Post: 26th February 2006, 01: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.