I am developing an application using python and Qt.
I have designed 2 Main windows ie..QMainWindow (Not QWidget or QDialog) using Qt.
Let it be.
1.
Although this is not directly relevant to your question, you should always set QLineEdit.EchoMode for the password field as follows (see here):
self.password.setEchoMode(QtGui.QLineEdit.Password)