I am writing my first Python app with PyQt4. I have a MainWindow and a Dialog class, which is a part of MainWindow class:
self.loginDialog = LoginDialog();
You don't use the same signal, when emitting and connecting.
QtCore.SIGNAL("aa(str)")
is not the same as QtCore.SIGNAL("aa")
. Signals must have the same signature. By the way, if you are defining your own signals, don't define parametres. Just write SIGNAL('aa'), because defining parametres is a thing from C++ and Python version of Qt doesn't need this.
So it should look like this:
QtCore.QObject.connect(self.loginDialog, QtCore.SIGNAL("aa"), self.login)
and if you pass any parametres in emit, your login method must accept those parametres. Check, if this helps :-)