1. Before you select some text, store the current cursor state:
2. Select your text using movePosition and all that stuff. Do something with the selected text;Qt Code:
To copy to clipboard, switch view to plain text mode
3. Restore the saved cursor state:
Qt Code:
textEdit->setTextCursor (cr);To copy to clipboard, switch view to plain text mode




Reply With Quote
Bookmarks