Hi community,

is it possible with qtextedit (or any other text viewer/editor like qtextbrowser) to format html code?

I mean like that:
Qt Code:
  1. textedit->textCursor().insertHtml("<i><b>");
  2. textedit->textCursor().insertText("<img src='image.jpg' />");
  3. textedit->textCursor().insertHtml("</i></b>");
To copy to clipboard, switch view to plain text mode 
This should be the output:
<img src='image.jpg' />

Of course it doesnt work, the output is:
<img src='image.jpg' />

How to achieve that html code ist displayed as plaintext but also formatted (well then it wouldn't be plaintext)?