Hi,

I have this QByteArray whose first 2 bytes are, say 0x11 and 0x08.

I'd like to extract those 2 byte into a quint16.

I've tried myByteArray.left(2).toUInt() with no success..

Since these 2 bytes represent a value in little-endian format I must extract them to a quint16 and then qToBigEndian the value.

Could someone please point me the proper way to do it?

TIA,
Pedro.