QByteArray byte="4e1f";
bool ok;
QChar* unicode=new QChar[1];
unicode[0]=byte.toInt(&ok,16);
QString str=QString::fromRawData(unicode,1);
QMessageBox::information(this,"",str);
QT unicode编码转汉字
最新推荐文章于 2024-03-03 16:50:24 发布
QByteArray byte="4e1f";
bool ok;
QChar* unicode=new QChar[1];
unicode[0]=byte.toInt(&ok,16);
QString str=QString::fromRawData(unicode,1);
QMessageBox::information(this,"",str);