title: Qt: typeid alternative
body: <p>I'm wondering if Qt provides an alternative to typeid to recognize variable types and get their name in a human-readable format.
  My specific problem is the following: </p>
  
  <pre><code>struct gArgument{
      QString type; 
      void* arg;
  };
  
  void gargConverter(gArgument* oArg, T data){
      oArg-&gt;type = typeid(data).name();
      oArg-&gt;arg = static_cast&lt;void*&gt; (&amp;data);
  }
  </code></pre>
  
  <p>the idea would be that of generalizing a variable to use as a input to functions. 
  As a side node tyeinfo seems not to be working correctly on my system (I'm using MinGW on Windows 7), if I try:</p>
  
  <pre><code>  int i; std::cout &lt;&lt;   typeid(i).name() &lt;&lt; std::endl;
    QString s; std::cout &lt;&lt;   typeid(s).name() &lt;&lt; std::endl;
    double d; std::cout &lt;&lt;   typeid(d).name() &lt;&lt; std::endl;
    float f; std::cout &lt;&lt;   typeid(f).name() &lt;&lt; std::endl;
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>i
  7QString
  d
  f
  </code></pre>
  
  <p>Any suggestion?</p>