I have a D开发者_开发问答ATA_BLOB structure but I need to convert it to QString. How can I do this?
You can use the QString
constructor with a QByteArray
parameter.
You can use too the constructor with the const char*
parameter too
Hope that helps
BYTE* myByteBlob;
int myByteBlobSize;
// Get the blob, find out the size.
// ...
QString myString( QByteArray( myByteBlob, myByteBlobSize));
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));
精彩评论