Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Retrieving the text from QLineEdit
Arnon last edited by
I want to retrieve the entered text from QLineEdit and put it into a variable
My question is what is the proper code to perform this action?
koplersky last edited by
You use the "text" method.
@QString name = ui->lineEdit->text();@
Refer to the QLineEdit documentation to see its members and information:
koahnig last edited by
You can retrieve the input with "text()":http://qt-project.org/doc/qt-5/qlineedit.html#text-prop
However, you might to checkout the "tutorials and examples":http://qt-project.org/doc/qt-5/qtexamplesandtutorials.html for more details on the different ways to use QLineEdit