Answer the question
In order to leave comments, you need to log in
How to display string in label?
string h = ui->lineEdit->text().toStdString();
ui->label_3->setText(h);
Answer the question
In order to leave comments, you need to log in
Use QString , not strings, why are you converting to stdString at all?
QString h(ui->lineEdit->text().toStdString().c_str());
ui->label_3->setText(h);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question