Edder
14th July 2012, 12:55
Hi community,
is it possible with qtextedit (or any other text viewer/editor like qtextbrowser) to format html code?
I mean like that:
textedit->textCursor().insertHtml("<i><b>");
textedit->textCursor().insertText("<img src='image.jpg' />");
textedit->textCursor().insertHtml("</i></b>");
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)?
is it possible with qtextedit (or any other text viewer/editor like qtextbrowser) to format html code?
I mean like that:
textedit->textCursor().insertHtml("<i><b>");
textedit->textCursor().insertText("<img src='image.jpg' />");
textedit->textCursor().insertHtml("</i></b>");
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)?