Results 1 to 5 of 5

Thread: old layout item remain on widget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Posts
    20
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question old layout item remain on widget

    hello everyone ,
    i've got some problem about change the layout item's.
    i'm using : qt 4.7 in winidows xp sp3

    i made a simple program , with 2 button's change a mainLayout item
    the item compositing by several label , and i put some word in corner ,
    after change layout (from 4 label to 2 label) some word still exist on window
    and part of button covered by the old label .

    i put whole project and picture in attachments , any suggestion would be appreciate

    thanks
    and sorry for my poor english
    ---------
    another problem is after i delete the layout item
    i always got the following msg , but everything keep going
    QCoreApplication:: postEvent: Unexpected null receiver
    QLayout::addChildLayout: layout "" already has a parent
    code about delete layout item
    Qt Code:
    1. QLayoutItem *child;
    2. while ((child = mainLayout->takeAt(0)) != 0) {
    3. child->widget()->deleteLater();
    4. }
    5. delete child;
    To copy to clipboard, switch view to plain text mode 
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by lllturtle; 25th March 2011 at 09:08. Reason: add a normal picture

Similar Threads

  1. Hiding Layout item - Layout does not use available space
    By Asperamanca in forum Qt Programming
    Replies: 0
    Last Post: 27th January 2011, 09:51
  2. mainwindow layout vs widget layout
    By fatecasino in forum Newbie
    Replies: 2
    Last Post: 14th December 2010, 14:45
  3. How to resize a layout item?
    By lni in forum Qt Programming
    Replies: 3
    Last Post: 22nd February 2009, 08:53
  4. QMenu: remain visible while mouseOver
    By vonCZ in forum Newbie
    Replies: 10
    Last Post: 25th October 2007, 16:54
  5. Replies: 14
    Last Post: 9th November 2006, 08:35

Tags for this Thread

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.