[PyKDE] Quitting invokes crash handler

Jim Bublitz jbublitz at nwinternet.com
Fri Aug 30 21:32:01 BST 2002


On 30-Aug-02 Frederick Polgardy Jr wrote:
> On Friday 30 August 2002 10:26 am, Phil Thompson wrote:
>> I haven't looked at the way you have implemented KApplication,
>> but have a look at how I've implemented the QApplication dtor.
>> You will need to do something similar - look at the comments
>> at the start of PyQtDisownTopLevelWidgets().
 
> This is perfectly consistent with everything we've discovered so
> far:
 
> 1) Forcefully deleteing the main window before exiting fixes the
> problem
 
> 2) Changing the var names/lengths causes "unpredictable" behavior
> (i.e. since the order of keys in namespaces is undefined, a
> change in var name or length would affect whether the KApp gets
> destroyed before the main widget in Python)

Yep - that fixes it.

Somewhere in the KApplication class (public section) add:

    ~KApplication();

%MemberCode
     PyQtDisownTopLevelWidgets();
%End


Jim




More information about the PyQt mailing list