QT unicode QByteArray与QString互转
QByteArray array; array[0] = 0xAA; QString str = QLatin1String(array); QString str2 = QString::fromLatin1(array); qDebug() << array << str << str.toLatin1() << str2.toLatin1() << str2;
打印:"\xAA" "a" "\xAA" "\xAA" "a"
本文来自博客园,作者:一夜梦想,转载请注明原文链接:https://www.cnblogs.com/caiyingyong/p/13628068.html