How to clear data from LineEdit after pressing PushButton?
I had made an user interface in which i have 1)lineEdit 2) pushButton.
I Want that after pressing push button data written by user in LineEdit would be cleared.
For this, i have construct this code but note working:-
QString a;
a=ui->lineEdit->text;
a.clear();
Please Reply!!
Thanks in advance!!
Re: How to clear data from LineEdit after pressing PushButton?
That clears the string, if you want to clear the line edit, call its clear() method, i.e. QLineEdit::clear().
Cheers,
_