(1) QString 转 char*
char acResult[10240];
//QByteArray baResult = strResult.toLatin1();
QByteArray baResult = strResult.toLocal8Bit();
char *pcResult = baResult.data();
strcpy(acResult, pcResult);
(2) char* 转QString
char acName[] = "huang";
QString strName = QString(QLatin1String(acName));
QString strName = QString::fromUtf8(acName);