QDebug supports QTextStream's manipulators, so use the hex manipulator and maybe you need to cast the char to an int:
Qt Code:
  1. qDebug() << hex << (int)test.at(0);
To copy to clipboard, switch view to plain text mode