Results 1 to 2 of 2

Thread: Delete content widget in layout

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Location
    Cuba
    Posts
    35
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Delete content widget in layout

    Hi
    I'm trying to delete a widget or several widgets content in a QBoxLayout. How can I do this?

    This is my code:

    Qt Code:
    1. void CustomRadioButton::deleteOption(int pos)
    2. {
    3. if(pos >= 0 && pos < getLayout()->count())
    4. {
    5. delete getLayout()->takeAt(pos);
    6. update();
    7. }
    8. }
    To copy to clipboard, switch view to plain text mode 

    I think I managed to delete the widget, but the layout do not updated visually. Any idea??
    Thanks in advanced and excuse my English.
    Last edited by high_flyer; 17th December 2010 at 16:12. Reason: code tags

Similar Threads

  1. mainwindow layout vs widget layout
    By fatecasino in forum Newbie
    Replies: 2
    Last Post: 14th December 2010, 14:45
  2. Replies: 2
    Last Post: 2nd November 2010, 01:43
  3. Delete Layout and its childs
    By jano_alex_es in forum Newbie
    Replies: 1
    Last Post: 8th May 2009, 12:23
  4. delete layout() / setLayout issue
    By vlg789 in forum Qt Programming
    Replies: 5
    Last Post: 21st September 2007, 17:25
  5. Replies: 7
    Last Post: 15th June 2007, 16:13

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
  •  
Qt is a trademark of The Qt Company.