append(QString)
C++ (Qt)QTextCursor cursor = ui->txtEdit->textCursor();cursor.movePositiion(QTextCursor::Start,QTextCursor::MoveAnchor);ui->txtEdit->insertPlainText(str);ui->txtEdit->insertPlainText("\n");cursor.movePositiion(QTextCursor::Start,QTextCursor::MoveAnchor);
C++ (Qt)const QTextCursor & lastCursor = ui->textEdit->textCursor();QTextCursor curCursor(ui->textEdit->document());curCursor.movePosition(QTextCursor::Start);curCursor.insertText(ui->lineEdit->text());ui->textEdit->setTextCursor(lastCursor);
C++ (Qt)QTextCursor cursor(ui->txtEdit->document());cursor.movePosition(QTextCursor::Start);ui->txtEdit->setTextCursor(cursor);ui->txtEdit->insertPlainText(str+"\n");
C++ (Qt)ui->textEdit->scroll(0,0);