目录
QString 转 const char *
QString qstr = "hello";
std::string str = qstr.toStdString();
const char* cstr = str.c_str();
qDebug()<<QString::fromLocal8Bit(cstr);
QString 转 char *
QString qStr = "hello";
std::string stdStr = qStr.toStdString();
char* charStr = (char*)(stdStr.c_str());
QString 转 LPCWSTR
QString qstr = "蓝火炬,abcd";
std::wstring wstr = qstr .toStdWString();
LPCWSTR speakStr = wstr.c_str();
int 转 QString
QString str = QString::number(10);