Thank you! The Qt documentation is very good, but there is lots of it. Your keywords pointed me to the right direction.
To save other noobies an hour or two, here is where the keys were found:
All Overviews and HOWTOs in general and especially, Supported HTML Subset. I hadn't realized the qTextEdit used HTML inside!
Here is some example code:
ui->TextEdit->setText("1234567890<br>1234567890<br>line3");
cursor.
setPosition(15,
QTextCursor::MoveAnchor);
// Go to 4th character of second line; the <br> counts as one character. cursor.insertHtml("<FONT color=green style=\"BACKGROUND-COLOR: yellow\">"+s+"</FONT>"); // make them ugly
ui->TextEdit->setText("1234567890<br>1234567890<br>line3");
QTextCursor cursor(ui->TextEdit->document());
cursor.setPosition(15, QTextCursor::MoveAnchor); // Go to 4th character of second line; the <br> counts as one character.
cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, 3); // select three charaters
QString s=cursor.selectedText();
cursor.insertHtml("<FONT color=green style=\"BACKGROUND-COLOR: yellow\">"+s+"</FONT>"); // make them ugly
To copy to clipboard, switch view to plain text mode
The more familiar I get with Qt, the more I like it.
Bookmarks