I've got an std::string content
that I know contains UTF-8 data. I want to convert it to a QString
. How do I do that, avoiding the from-ASCII conversion in Qt?
There's a QString
function called fromUtf8
that takes a const char*
:
QString str = QString::fromUtf8(content.c_str());