I am trying to assign the text input (Username and password) to a new variable (IPassword and IUsername) to be used in other def's. I cant get it to work, When running the code i get the following error 'Error: Can't assign to function call'. The code is below:
class LoginWidget(QtGui.QWidget):
success = QtCore.pyqtSignal()
def __init__(self, parent=None):
super(LoginWidget, self).__init__(parent)
self.Username = QtGui.QLineEdit(self)
self.Password = QtGui.QLineEdit(self)
self.Password.text() = IPassword
self.Username.text() = IUsername
self.buttonLogin = QtGui.QPushButton('Login', self)
self.buttonLogin.clicked.connect(self.handleLogin)
def handleLogin(self):
global IPassword
global IUsername