PDA

View Full Version : Updating a QLayout content



Caius Aérobus
6th May 2008, 17:34
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?

Gopala Krishna
7th May 2008, 06:16
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.