PDA

View Full Version : QPlainTextEdit, focusing on last line



metdos
27th July 2009, 09:07
In a while loop, I'm adding new lines to my QPlainTextEdit using insert() function, I want to keep focus on last line, but I could not manage. How can I do this?

Thanks.

nish
27th July 2009, 09:11
after adding a line
use moveCursor() to move the cursor to the end..
and use the verticalScrollBar() from QAbstractscrollarea and set its value to maximum..