Engine
Engine

Reputation: 5420

how to get the content of QLineEdit

I want to use QLineEdit for input. My problem is that I don't know how I can read its contents.

Let's say I have:

QLineEdit *edit = new QLineEdit("");

After adding it to the GUI how can get the content? Thanks in advance.

Upvotes: 6

Views: 18243

Answers (1)

It has a text property, so simply do:

edit->text();

Upvotes: 9

Related Questions