title: Qt: Convert QString to Hexadecimal
body: <p>I know this is a very basic question but I'm newbie in Qt and I don't know to do it. I'm trying to convert a QString value (like "AA110011") to hexadecimal. I would like to obtain 0xaa110011. I've tried with this code:</p>
  
  <pre><code>QByteArray b = aString.toUtf8();
  
  for (int i = 0; i &lt; b.length(); i++ )
  {
      if ( b[i] &gt;= 65 &amp;&amp; b[i] &lt;= 70 )
      {
          b[i] = b[i] - 55;
      }
      else if (b[i] &gt;= 48 &amp;&amp; b[i] &lt;= 57)
      {
          b[i] = b[i] - 48;
      }
  }
  </code></pre>
  
  <p>I obtain in the Memory at Vairable "[0]" the value 0a 0a 01 01 00 00 01 01 and I don't know how could I obtain aa 11 00 11.</p>
  
  <p>Could you help me? thanks.</p>