[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] PyQt crash
From: Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date: 2006-12-03 15:13:31
Message-ID: 200612031513.33102.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]
On Thursday 30 November 2006 11:48 pm, Giovanni Bajo wrote:
> Phil Thompson wrote:
> >>>>> from qt import QApplication
> >>>>> app = QApplication(["-v"]*10)
> >>>>> del app
> >>>>> app = QApplication([])
> >>
> >> I'm using Qt 3.3.6, PyQt 3.16, SIP 4.4.3, under Windows.
> >
> > It will be fixed in tonight's snapshot. A workaround is to pass a dummy
> > argument in the second ctor call.
>
> Thanks.
>
> > Note that PyQt4 handles QApplication differently and delays calling the
> > dtor until the interpreter exits. So, in the above case, you will have
> > two QApplication instances existing at the same time.
>
> So, how do I destroy a QApplication? It's needed for unittests to make sure
> each test starts clean (without inheriting spurious events/widgets/things
> from a previous test).
That's a good question. I think I chose to do it a different way with PyQt4
because I couldn't use the same trick with QCoreApplication to make sure it
got destroyed last.
With hindsight I think the PyQt3 approach is better to I'll change it.
Phil
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic