我有一个DATA_BLOB结构,但我需要将其转换为 QString。我怎样才能做到这一点?
问问题
6368 次
3 回答
1
您可以使用带有参数的QString
构造函数。QByteArray
您也可以使用带有参数的构造函数const char*
希望有帮助
于 2010-09-07T12:08:31.207 回答
0
BYTE* myByteBlob;
int myByteBlobSize;
// Get the blob, find out the size.
// ...
QString myString( QByteArray( myByteBlob, myByteBlobSize));
于 2010-09-07T12:41:53.510 回答
0
BYTE* pu8_RawData = (BYTE*)i_RawData.parray->pvData;
DWORD u32_RawLen = i_RawData.parray->rgsabound[0].cElements;
qDebug() << QString(QByteArray((const char*) pu8_RawData, (int)u32_RawLen));
于 2014-03-06T11:45:56.897 回答