title: How to cast a QChar to int
body: <p>In C++ there is a way to cast a char to int and get the ascii value in return. Is there such a way to do the same with a qchar? Since unicode supports so many characters and some of them are actually looking alike, it is sometimes hard to tell what one is dealing with. An explicit code point or a number that can be used to get such would be very helpful. </p>
  
  <p>I searched a the web and this site for a solution but so far no luck, Qt documentation isn't much of help either, unless I'm overlooking something.</p>
  
  <p>Thank you in advance!</p>
  
  <p>EDIT:</p>
  
  <p>Maybe I wasn't clear enough on the matter, sorry.</p>
  
  <p>Here's some code:</p>
  
  <pre><code>char chChar = 'a';
  cout &lt;&lt; (int)chChar; // will output 97, not 'a'
  </code></pre>
  
  <p>Also, Qt allows this:</p>
  
  <pre><code>QChar ch = 'a';
  if(ch == 0x61)
  //...
  </code></pre>
  
  <p>As far as I can tell, there has to be some information relating to the unicode codepoint in the ch object. Any possibility to get it out of there?</p>