[PyQt] qApp does not return None when no QApplication has been instantiated

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Tue Jul 24 06:55:16 BST 2007


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).

Gerard



More information about the PyQt mailing list