PDA

View Full Version : Setting focus to top of QTextEdit



Jon Heron
25th October 2010, 19:53
Hi all,

I am populating a QTextEdit with text using;

ui->textEdit->append(QString);
The focus is always at the end of the string after execution, is there any way to set the focus to the start of the string or top of the QTextEdit?
I have tried
QTextEdit::scroll(0,0) with no joy...

Any suggestions are appreciated!

Cheers,
Jon

wysota
25th October 2010, 19:56
QTextEdit::textCursor()
QTextCursor::movePosition()
QTextEdit::setCursor()