Results 1 to 2 of 2

Thread: Updating a QLayout content

  1. #1
    Join Date
    Mar 2006
    Posts
    142
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Updating a QLayout content

    Hello,
    I have a QVBoxLayout containing a couple of thumbnails, which is empty as the application is shown, then I add some widgets in the layout but...nothing appears, despite layout::count() returns the right number (ie >0) of widgets. How could I force the new widgets to show?

  2. #2
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Thanks
    37
    Thanked 53 Times in 40 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Updating a QLayout content

    Quote Originally Posted by Caius Aérobus View Post
    Hello,
    I have a QVBoxLayout containing a couple of thumbnails, which is empty as the application is shown, then I add some widgets in the layout but...nothing appears, despite layout::count() returns the right number (ie >0) of widgets. How could I force the new widgets to show?
    May be the widgets are hidden ? If so try addedWidget->show()

    Secondly probably the QVBoxLayout isn't setup on the top level widget (or center widget in case of QMainWidget).
    Just check if that QVBoxLayouts parent is NULL or not.
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

Similar Threads

  1. QTreeWidget not updating content...
    By lni in forum Qt Programming
    Replies: 7
    Last Post: 14th August 2010, 16:06

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.