std string to qstring code example Example: std::string to qstring QString str = QString::fromUtf8(content.c_str());