[ Solved ] From HTML to QString Utf8
-
wrote on 29 Jul 2011, 22:30 last edited by
Greetings Qt enthusiasts,
I'm trying to convert some HTML text into an Utf8 QString.
Is there something built in Qt to achieve this ?
Maybe someone has some code to share for that matter ?
Thanks.
B.A.
-
wrote on 29 Jul 2011, 22:41 last edited by
"QTextDocument":http://doc.qt.nokia.com/4.7/qtextdocument.html may contain what you need, though I haven't used it, myself, for that purpose.
-
wrote on 29 Jul 2011, 23:01 last edited by
This:
@QTextDocument document;document.setHtml(text);
document.toPlainText();
@
does the trick.Thanks !
1/3