Unsolved New line on TextEdit
-
Hello, I 'm getting data from an arduino by usb and it's ok. The problem is that I want to write te data on a textEdit while these are coming and write it on different's line. I tried this:
ui->textEdit->setText(data);
ui->textEdit->append("\n");
ui->textEdit->setText(data2);Anda data are QString types. but it's show just the first line.
-
Hi,
You should only call
append
,setText
replaces the content of the QTextEdit. -
thanks, that's works!
-
You're welcome !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)