[Qt-interest] Removing widget from layout
wim.delvaux at adaptiveplanet.com
wim.delvaux at adaptiveplanet.com
Fri Feb 6 15:43:49 CET 2009
On Friday 06 February 2009 14:07:11 NARCISO, Rui wrote:
> Thanks so much
>
> And you are indeed right, hiding the widgets without removing them was
> enough.
Also I think remove just takes the widgets out of the grid's layout but does
not dispose of them. SO I think they just still exist. Hence the are
reparented to 0 and hence they paint as toplevel widgets and hence on top of
the widget in the grid.
W
>
> -----Message d'origine-----
> De : Bachrach, Robert L [mailto:rob.bachrach at tycoelectronics.com]
> Envoyé : vendredi 6 février 2009 13:52
> À : NARCISO, Rui; 'Qt Interest (E-mail)'
> Objet : RE: Removing widget from layout
>
> 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
> This mail has originated outside your organization, either from an external
> partner or the Global Internet. Keep this in mind if you answer this
> message.
>
>
>
> The information in this e-mail is confidential. The contents may not be
> disclosed or used by anyone other then the addressee. Access to this e-mail
> by anyone else is unauthorised. If you are not the intended recipient,
> please notify Airbus immediately and delete this e-mail. Airbus cannot
> accept any responsibility for the accuracy or completeness of this e-mail
> as it has been sent over public networks. If you have any concerns over the
> content of this message or its Accuracy or Integrity, please contact Airbus
> immediately. All outgoing e-mails from Airbus are checked using regularly
> updated virus scanning software but you should take whatever measures you
> deem to be appropriate to ensure that this message and any attachments are
> virus free.
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list