PyQT: qt.qApp

John J. Lee jjl at pobox.com
Wed Jan 14 19:55:59 EST 2004


"Axel Mittendorf" <newsreply at transfertech.de> writes:
[...]
> in my application I want to subclass qt.QApplication and
> use this subclass instead of QApplication for my gui. Some
> of my modules are automatically generated by pyuic and
> I am not allowed to change their source code. The problem
> is these modules do "from qt import *" and use an object
> called 'qApp' which seems to be an instance of qt.QApplication

IIRC, qApp is *the* QApplication (there's only one QApplication
instance per application).


> and I want them to use my subclass (exactly its instance)
> instead of 'qApp'. How can I solve this?

I have a vague recollection that you can't, due to an obscure
limitation of either Qt or PyQt (or sip, maybe).  That might have
changed by now, though: ask on the PyKDE list.


> Can someone tell me what qt.qApp is and what it is used for?
> (I'm using PyQT 3.6.)

See above.


John



More information about the Python-list mailing list