Nov-22-2017, 08:05 AM
I have an input box for user to type their username.
I want that user input saved as a variable.
Here's what I have so far:
The fact that this seems to basic and I've spend 8 hours on it is killing me
I want that user input saved as a variable.
Here's what I have so far:
self.inputUsername = QtWidgets.QLineEdit(self.centralwidget) self.inputUsername.setGeometry(QtCore.QRect(10, 30, 151, 20)) self.inputUsername.setClearButtonEnabled(True) self.inputUsername.setObjectName("inputUsername")I'm still not sure if TEXTCHANGED is the right function I want...
self.inputUsername.textChanged.connect(self.Username)Then call it:
def Username(self): username = self.inputUsername.text()I've tried 100 different ways to set the variable, replacing textchanged with textset, 30 different things on stackoverflow. Nothing works

The fact that this seems to basic and I've spend 8 hours on it is killing me