[PyKDE] Destroying pyqt child widgets
Boudewijn Rempt
boud at valdyas.org
Fri Nov 16 21:41:21 GMT 2001
On Fri, 16 Nov 2001, Brent Burley wrote:
> Thanks. removeChild does seem to do the trick in most cases and
> certainly seems like the cleaner approach. However, it relies on the
> Python references going away before the widget can be destroyed. This
> is usually fine unless you have a reference leak (which still seems to
> happen a lot in PyQt unfortunately). If you do have a reference leak,
> removeChild will leave you with a child widget that is still being
> displayed but is now unmanaged - a bad situation.
>
I haven't encountered PyQt reference leaks yet, but if there are any,
they should be eradicated with extreme prejudice :-). If I try to use
the reparent function, then my entire window disappears.
Boudewijn Rempt | http://www.valdyas.org
More information about the PyQt
mailing list