I have a QTextEdit
and I am trying to insert text to top of that using following code
void HuggleLog::InsertText(QString text)
{
ui->textEdit->cursorForPosition(QPoint(0,0));
ui->textEdit->insertPlainText(text);
}
I am trying to move the cursor to beginning of text area so that text get inserted infront of current text, but it doesn't work. What is a correct way? There is append() method but no prepend.