I'm working on my serialport assistant, I want to show the data received on QPlainTextEdit, firstly, I tried "append":
QByteArray serialData = mySerialPort->readAll();
ui->receiveData->appendPlainText(buf);
“append”is fast,never reduce the baudRate,but it will append a new paragraph with new line,it looks very uncomfortable.
after view this answer,How to append text to QPlainTextEdit without adding newline, and keep scroll at the bottom? I tried this
ui->receiveData->moveCursor(QTextCursor::End);
ui->receiveData->insertPlainText(buf);
without new line,but It brought more serious problems.it reduce the baudRate (Calculate once per second) gradually from 460800 to 1200 even lowver! besides,the UI interface even became unresponsive.
Please help or try to give some ideas how to achieve this.