Access the QTextDocument that underlies the QTextEdit. You can then create a QTextCursor into the document and use something like:
cursor->movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor);
cursor->movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
To copy to clipboard, switch view to plain text mode
to highlight the current word, and:
cursor->movePosition(QTextCursor::NextWord, QTextCursor::MoveAnchor);
cursor->movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
To copy to clipboard, switch view to plain text mode
to move along a word.
Bookmarks