std::string cstr;
QString qstring;
//****从std::string 到QString
qstring = QString(QString::fromLocal8Bit(cstr.c_str()));
//****从QString 到 std::string
cstr = string((const char *)qstring.toLocal8Bit());
转载自:http://zhmy.michael.blog.163.com/blog/static/861578792011112104430940/