Hmm, I'm not sure what to make of that. The most popular solution seems to be using QDataStream but isn't that kind of a detour? Why can't I just extract a decimal representation from the ByteArray?
Something like this:
QByteArray ba = MyDevice->read(readBytes)
int myInt = ba[1]
The closest that I've come is to get a 1-128 positive and negative (signed 8-bit?) but that is with quite ugly code and of course I could write an algorithm to convert this to a 0-255 representation but surely there is some really simple syntax to fix this???
Regards
/Tottish




Reply With Quote

Bookmarks