title: Construct a QByteArray from a HEX value entered as a QString
body: <p>If <code>QString str = "0xFFFF"</code>, how to turn this text representation of an hex into a QByteArray? In the end, I would like to have the same of what I get from the following:</p>
  
  <pre><code>QByteArray ba;
  ba.resize(2);
  ba[0] = 0xFF;
  ba[1] = 0xFF;
  </code></pre>