[PyQt] qApp and QApplication are not the same

Nahuel Defossé nahueldefosse at yahoo.com.ar
Thu Oct 11 08:38:30 BST 2007

I've created my QApplication class like this:
class MyApp(QtGui.QApplication):
    def __init__(self, *args):
        super(MyApp, self).__init__(*args)
        # bla bla bla
        mywin = MyWin()
    def say_hello(self):
        print "Hello"

But, within MyWin if I call QtGui.qApp.say_hello, it says it's not defined... 
It's even worse, if I ask for QtCore.qApp's type it says 

There's no cast in python, is it? How could I get extra methods I defined in 
my custom QApp class?


More information about the PyQt mailing list