Hey guys,

I want to convert a QString to utf8 html compliant so it can be viewed in a QWebPage.

Qt Code:
  1. QTextCodec *codec = QTextCodec::codecForName("UTF-8");
  2. QByteArray string = codec->fromUnicode(output);
To copy to clipboard, switch view to plain text mode 

I tried the above with no succes.