Hi I read a Packed BCD from a file that I Want to convert it to it's decimal representation. the data length is 32 bytes and for example this is what is in the file :
95 32 07 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 01 00 13 00
I want to show the data as it is how can i do it?
thanks schef it worked for me. I have another question: I the data that I read some of data are numerical data that are in raw hex format for eeample :
22 d8 ce 2d
that must interpreted as:
584633901
what is the best and quickest way? currntly I do it like this:
QByteArray DTByteArray("\x22 \xd8 \xce \x2d");
QDataStream dstream(DTByteArray);
dstream.setByteOrder(QDataStream::BigEndian);
qint32 number;
dstream>>number;
and for 1 and 2 byte integers I do it like this:
QString::number(ain.toHex(0).toUInt(Q_NULLPTR,16));