title: qvariant_cast<std::string> returns empty string
body: <p>I am using QT 5.7 and MVSC - 2010 (yes, it is old, but I have to due to project)</p>
  
  <p>I have a template function</p>
  
  <pre><code>template&lt;T&gt;
  T foo (QString qs)
  {
      return qvariant_cast&lt;T&gt;(qs);
  }
  </code></pre>
  
  <p>If I make </p>
  
  <pre><code>void main()
  {
      std::string str = "42"
      QString qss = QString::fromStdString(str);
      std::string another_str = foo&lt;std::string&gt;(qss );
  }
  </code></pre>
  
  <p>Then <code>another_str</code> will be "";
  While toStdString method works perfectly. What is the problem of qvariant_cast?</p>
  
  <p>P.S. I have declared qt meta type, so qvariant_cast is compling, but returning empty string.</p>