[PyKDE] Non disappearing label
Phil Thompson
phil at riverbankcomputing.co.uk
Mon Nov 10 10:41:01 GMT 2003
On Monday 10 November 2003 5:56 am, Derek Fountain wrote:
> If I have a frame, inside which I put a label arranged via a vertical
> layout box, then call this code:
>
> contentsFrameLayout = self.contentsFrame.layout()
> contentsFrameLayout.remove( self.labelWidget )
> del self.labelWidget
>
> wouldn't I expect the label to disappear off screen? Because it doesn't,
> and that puzzles me... :o}
The remove() simply removes the widget from the set managed by the layout
manager. You need to remove the labelWidget from its parent. See the FAQ
entry on deleting the children of QObjects.
Phil
More information about the PyQt
mailing list