QT unicode编码转汉字---16进制unicode转汉字

转载: https://blog.csdn.net/qq503690160/article/details/37830767

 

QByteArray byte="4e1f";
bool ok;
QChar* unicode=new QChar[1];
 
unicode[0]=byte.toInt(&ok,16);
QString str=QString::fromRawData(unicode,1);
qDebug() << str;
// QMessageBox::information(this,"",str);

 

你可能感兴趣的:(Qt)