title: QSerialPort - Convert char to Hex
body: <p>I'm developing an app with Qt and I have to read frames and check each byte to see if its values are correct.</p>
  
  <pre><code>QSerialPort serial;
  QByteArray data = serial.readAll();
  </code></pre>
  
  <p>I well receive bytes but I don't know how to check if they are well equal to my hex values. I'd like to do something like this:</p>
  
  <pre><code>if (data[0] == 0x02) {
      // my code
  }
  </code></pre>
  
  <p>My question will probably be stupid for most of you but I don't find any answer :(</p>