QByteArray::at() or QByteArray[] is a char - not a QChar. The QChar is a result of a conversion made by qDebug(). If you know the size of the QByteArray, then
Qt Code:
  1. const unsigned char *pdata = reinterpret_cast<const unsigned char *>(thearray.constData());
To copy to clipboard, switch view to plain text mode 
gives you a pointer to binary data in the QByteArray. The casting is necessary to get rid of signed values (see above, where 0xA0 was output as 0xFFA0, etc.) Now, you can, for example:
Qt Code:
  1. qDebug << pdata[i];
To copy to clipboard, switch view to plain text mode 
or convert to int by simple assigning:
Qt Code:
  1. int val = pdata[i]; // no sign extension
To copy to clipboard, switch view to plain text mode