QPlainTextEdit How to de-select all?
Solved
General and Desktop
-
wrote on 1 Dec 2015, 20:32 last edited by
I am attempting to learn Qt on Ubuntu and C++ and have been using the Terminal example. I've been able to selectAll() and copy() the selected text but don't see how to deselect it after I've copied it. I've not found any reference in my Google and Qt forum searches.
How is this done?
-
Lifetime Qt Championwrote on 1 Dec 2015, 20:48 last edited by mrjj 12 Jan 2015, 20:55
hi
try this
QTextCursor cursor = ui->textEdit->textCursor();
cursor.movePosition( QTextCursor::End );
ui->textEdit->setTextCursor( cursor );ui->textEdit should of course be changed to the real name in your app.
-
wrote on 2 Dec 2015, 21:43 last edited by
Thanks, worked as expected!
1/3