Hello,
I have a Line Edit in my PyQt5 GUI and I'm wondering how I can take the input the user types in and store it into a python variable once the user is done typing (Once the user is no longer on that edit line).
This is the line edit chunk of my GUI code:
So if anyone can help me understand how to take in the user's input that would be great.
Thanks in advance.
Some background info (that may/may not help):
This is for my login screen which takes in a Name and a Password. Once the user has entered all that they hit a Log in button. Then it will go through some of my python code to ensure everything's valid then it will go to the main menu. (I already have a working terminal version of this and I hope to have a nice working gui for it :)
I have a Line Edit in my PyQt5 GUI and I'm wondering how I can take the input the user types in and store it into a python variable once the user is done typing (Once the user is no longer on that edit line).
This is the line edit chunk of my GUI code:
self.NameInput = QtWidgets.QLineEdit(self.centralwidget) self.NameInput.setStyleSheet("background-color: rgb(255, 255, 255);") self.NameInput.setText("") self.NameInput.setObjectName("NameInput")I've been looking at some tutorials, but they either don't work or are hard to follow.
So if anyone can help me understand how to take in the user's input that would be great.
Thanks in advance.
Some background info (that may/may not help):
This is for my login screen which takes in a Name and a Password. Once the user has entered all that they hit a Log in button. Then it will go through some of my python code to ensure everything's valid then it will go to the main menu. (I already have a working terminal version of this and I hope to have a nice working gui for it :)