Qt Code:
int dd = 0xA5; QByteArray p; p.push_back (0xA5); qDebug () << "SOP: " << (int)p[0];To copy to clipboard, switch view to plain text mode
This results in -91 whereas 0xA5 stands for 165 in decimal.
How to store hex in QBytearray, extract it and convert it to decimal?
Added after 11 minutes:
This helped: http://www.qtcentre.org/threads/2959...019#post139019
Also, I could have casted it to unsigned char.
Bookmarks