[Qt-interest] Removing widget from layout
Bachrach, Robert L
rob.bachrach at tycoelectronics.com
Fri Feb 6 13:52:27 CET 2009
Rui wrote:
> I have a 2x2 QGridLayout and at the push of button I want to
> keep on my layout only one of the widgets on this layout and
> hide the others.
>
> I have so far been able to make sure the selected widget
> takes up the entire layout, however the other 3 widgets that
> i remove using the QGridLayout::removeWiget command remain on
> screen in front of the one that takes the entire layout...
You probably want to hide the widgets you are removing (pWidget->hide()). It is very possible you don't even need to remove the widgets from the grid layout once they are hidden.
Rob
More information about the Qt-interest-old
mailing list