Do you mean
1. the very last line of the whole document in the QTextBrowser (the bottom line), or
2. the last line chronological seen?
1. You can move the cursor to the end of document: From there you can select the text until the line start. After that you ask the cursor to return the selected text.
QString text
= ui.
textEdit->cursor
().
selectedText();
ui.textEdit->moveCursor( QTextCursor::End );
ui.textEdit->moveCursor( QTextCursor::StartOfLine, QTextCursor::KeepAnchor );
QString text = ui.textEdit->cursor().selectedText();
To copy to clipboard, switch view to plain text mode
Code is untested, but it should lead the way.
2. Place the cursor to the end of the line you just edited and do the same as above
.
Bookmarks