PyQT: qt.qApp

Roberto Alsina ralsina at
Thu Jan 15 04:24:08 CET 2004

"Axel Mittendorf" <newsreply at> wrote in message news:<bu3pph$qma$01$1 at>...
> Hello,
> 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
> and I want them to use my subclass (exactly its instance)
> instead of 'qApp'. How can I solve this?
> Can someone tell me what qt.qApp is and what it is used for?
> (I'm using PyQT 3.6.)

Well, there are some times when you need to call a method of

For example, if you want to put a hourglass cursor for the whole app,
you call

Anyway, you shouldn´t worry about this. Whatever object you create
that inherits QApplication will be qApp. Since there can only be one
of those, there is no way it´s gonna get confused ;-)

Roberto Alsina

More information about the Python-list mailing list