I had the same issue ... I settled on iterating through all items of the layout and removing it from the layout by calling removeItem
Cheers Frank >> Hi, >> >> I need to write some gui code that add some buttons to a layout. But >> now and then these buttons change. So I wrote the code so that I >> create a layout for the buttons and then do setLayout to the widget. >> Now if the buttons have to be renewed if do widget.layout().dispose() >> and again setLayout with the new layout. But the problem is that the >> old buttons stay visible. > try to simple hide the button with button.hide(). > > I do something similar but I add all the buttons to the layout and simply > show() or hide() the buttons that I need. > > Try to avoid the dispose() function. >> >> How can I fix this problem? Is this the correct thing to do, or are >> there better ways of doing this? >> >> Thanks. >> > _______________________________________________ > Qt-jambi-interest mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest _______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
