QByteArray text = QByteArray::fromHex("517420697320677265617421");
text.data(); // returns "Qt is great!"
http://stackoverflow.com/questions/1258718/hex-to-string-conversion-c-c-qt
http://www.qtcentre.org/archive/index.php/t-18719.html
QString string = (compressed_string2.c_str());
QString res = string.toAscii().toHex();
qDebug() << res;
C++ Qt 字符串与十六进制转换示例
本文展示如何在 C++ 和 Qt 中进行字符串与十六进制之间的转换,通过实例演示了使用 QByteArray 和 QString 进行操作的方法。
1033

被折叠的 条评论
为什么被折叠?



