[PyKDE] Web article on wxWindows and PyQt
Hans-Peter Jansen
hpj at urpla.net
Sat Oct 4 16:18:00 BST 2003
On Saturday 04 October 2003 11:17, Phil Thompson wrote:
> On Saturday 04 October 2003 12:56 am, Michael Andrews wrote:
> > I don't know if anyone else saw this article (I found the link
> > from the Python Daily URL):
> >
> > http://www.dalkescientific.com/writings/diary/archive/2003/09/27/
> >PythonCard .html
> >
> > Most of the article talks about wxWindows and concludes that "...
> > wxPython even now just aren't there yet."
Let me add, that I switched to PyQt after looking under the covers
of both projects. There, it's pretty apparent, which one is
technologically vast superior ;-)
> > However, at the end of the article he mentions PyQt:
> >
> > "PyQt has its own set of problems, like the core dumps which
> > arise from deleting objects in the wrong order. (There was one
> > talk using Qt. The demos kept getting a core dump on exit because
> > the code didn't ensure qtApp was deleted last.)"
> >
> > I've seen problems with my apps compiled with Qt 3.2.x (I don't
> > even know if it is the same problem); but is this a wide spread
> > problem? In other words, are other PyQt application developers
> > seeing these problems?
>
> The problem of ensuring qApp isn't deleted too soon was fixed on
> 14th April 2002. The first release after that was v3.2.
Well, maybe they're talking about the problem with qApp.quit() and
overloaded event handlers under certain conditions (i.e. single
module apps). Attached is a script to exploit the problem (after
editing). Run it as python -v qt_dtor.py to explore the interaction
with python.
Conclusion: beware from using qApp.quit(), or even sys.exit(0) without
thinking twice. There are almost always better ways to close a PyQt
application. Use them.
Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt_dtor.py
Type: text/x-python
Size: 4967 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20031004/44eda802/qt_dtor.py
More information about the PyQt
mailing list