1、wchar_t 转 QString
wchar_t a[10];
QString str1= QString::fromWCharArray(a);
2、int/char 转 16进制QString 补0
int a = 0x0483;
QString str1 = QString("%1").arg(a,4,16,QLatin1Char('0'));
3、int 转 16进制QString
int a = 2;
QString str1 = QString::number(a,16);
4、QString 转 char *
QString str1 = "Hello";
QByteArray a = str.toLatin1();
char *b = a.data();
5、char * 转 QString
char *b;
QString str2 = QString(QLatin1String(b));
(未完待续)