Reputation:
When we use ui->TextEdit->append("...")
the text entered will be shown in a new line in the TextEdit section. What I want to do is to write on the same line... I've tried this code:
ui->textEdit->append("My name is:");
ui->textEdit->append("\b bla");
but it seems that "\b" isn't recognised by Qt
Upvotes: 1
Views: 378
Reputation: 506
Maybe an option is to do the append outside of the QTextEdit to avoid having a new paragraph created:
QString text = ui->textEdit->text();
text.append("bla");
ui->textEdit->setText(text);
Upvotes: 1