title: How to get ASCII characters out of hexadecimal values contained in a QString?
body: <p>I have a <em>QString</em> containing multipe hexadecimal values from <code>0x00</code> to <code>0xFF</code>. 
  I get the string from a <em>QTableWidget</em> and I want to convert the hex values in it to their corresponding ASCII characters, i.e. <code>0xAA</code> => <code>ª</code>, <code>0xFF</code> => <code>ÿ</code>, etc. The result should be displayed in a <em>QTextEdit</em>.</p>
  
  <p>Here is a minimal excample:</p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QDebug&gt;
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
      QString asciiAsQString = "0x4A 0x3B 0x1F 0x0D";
      qDebug() &lt;&lt; "hex as qstring." &lt;&lt; asciiAsQString;
      QString f;
  
      for(int i = 0; i &lt; asciiAsQString.length(); i++)
      {
          f.append(QChar(asciiAsQString.at(i).toLatin1()));
      }
      qDebug() &lt;&lt; "ascii of hex contained in qString:" &lt;&lt; f;
      return a.exec();
  }
  </code></pre>
  
  <p>I have tried this and several similar things, but nothing works as I expect.</p>
  
  <p>How can I fix the code to achieve the desired result?</p>