Results 1 to 6 of 6

Thread: delete layout() / setLayout issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: delete layout() / setLayout issue

    You better use a QStackedWidget.

    I think the problem is that you add widgets to both layouts, and you delete one of them. You should add the widgets to the second layout after the first one is deleted.
    This code:
    Qt Code:
    1. mainLayoutBigg = new QGridLayout((QWidget*)this);
    2. mainLayoutSmall = new QGridLayout((QWidget*)this);
    To copy to clipboard, switch view to plain text mode 
    Creating the layouts with parents causes them to be set just as using setLayout.
    Last edited by marcel; 21st September 2007 at 13:43.

Similar Threads

  1. Qt layout memory issue
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 25th August 2007, 17:11
  2. Qt layout issue
    By bunjee in forum Qt Programming
    Replies: 6
    Last Post: 15th August 2007, 19:43
  3. c++, placement delete upon exception
    By stinos in forum General Programming
    Replies: 6
    Last Post: 31st October 2006, 15:38

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.