[PyQt] qApp does not return None when no QApplication has been
instantiated
Phil Thompson
phil at riverbankcomputing.co.uk
Tue Jul 24 09:17:51 BST 2007
On Tuesday 24 July 2007 6:55 am, Gerard Vermeulen wrote:
> On Tue, 24 Jul 2007 06:51:08 +0200
>
> Gerard Vermeulen <gerard.vermeulen at grenoble.cnrs.fr> wrote:
> > >>> import PyQt4.Qt as Qt
> > >>> print Qt.QCoreApplication.instance()
> >
> > None
> >
> > >>> print Qt.qApp
> >
> > <PyQt4.QtGui.QApplication object at 0x2b78540079e0>
>
> This must be a SIP problem, because qApp also returns an
> QApplication instance without a preceding instantiation
> in PyQt3 (Qt checks whether qApp is NULL).
It's a feature that's been there since day 1. The problem is the way Qt
implements qApp.
Phil
More information about the PyQt
mailing list