[Qt-interest] Removing widget from layout
R. Reucher
rene.reucher at batcom-it.net
Fri Feb 6 13:53:30 CET 2009
On Fri February 6 2009 13:48:16 NARCISO, 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...
>
> I have to use the QGridLayout apporach I just mentioned due to architecture
> decisions.
>
> What am I doing wrong?
Can't say without some code snippet... anyway, have you tried using
QWidget::setVisible(bool) instead of removing the widgets from the layout?!
HTH, René
--
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/
If they can make penicillin out of moldy bread, they can sure make
something out of you.
-- Muhammad Ali
More information about the Qt-interest-old
mailing list