try this:
Qt Code:
yourTextEdit->append("<font color = red>XYZ</font>");To copy to clipboard, switch view to plain text mode
try this:
Qt Code:
yourTextEdit->append("<font color = red>XYZ</font>");To copy to clipboard, switch view to plain text mode
That wont work for a QPlainTextEdit. But you can set a syntaxhighlighter. See the "Syntax Highlighter Example" in the docs or direct QSyntaxHighlighter. Or you can use the the basic options of the text cursor which should be the fastest appproach. See QTextCursor and QTextCharFormat.
oh yea thats right. would work for QTextBrowser tho, and I think QTextEdit
Bookmarks