[PyKDE] Re: Signal destroyed() not emitted for QWidget
    Giovanni Bajo 
    rasky at develer.com
       
    Tue Feb 14 16:47:47 GMT 2006
    
    
  
Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
>> Thanks. But why does it work for QObject and not for QWidget?
>
> I don't know - you'll have to read the code of the QObject dtor. I'm just
> happy that C++ demonstrates the same behaviour.
Ah, found it! QObject's dtor does emit destroyed() and then deletes its
children. But QWidget's dtor also deletes its children (before doing the
actual platform-dependent destruction), so when the QObject dtor for the
QWidget is invoked, the proxy is gone and the signal is not forwarded.
-- 
Giovanni Bajo
    
    
More information about the PyQt
mailing list