title: Is there an easy way of using the QVariant class with hexadecimal strings?
body: <p>This code sample works as I would expect:</p>
  
  <pre><code>v = QVariant("123456");
  qDebug() &lt;&lt; v; // QVariant(QString, "123456")
  v.convert(QVariant::Int);
  qDebug() &lt;&lt; v; // QVariant(int, 123456)
  v.convert(QVariant::String);
  qDebug() &lt;&lt; v; // QVariant(QString, "123456")
  </code></pre>
  
  <p>Where as this doesn't:</p>
  
  <pre><code>v = QVariant("0xBEEF");
  qDebug() &lt;&lt; v; // QVariant(QString, "0xBEEF")
  v.convert(QVariant::Int);
  qDebug() &lt;&lt; v; // QVariant(int, 0)
  v.convert(QVariant::String);
  qDebug() &lt;&lt; v; // QVariant(QString, "")
  </code></pre>
  
  <p>Is there any simple way to make the QVariant class work with hexadecimal strings so the second example would work something like this:</p>
  
  <pre><code>v = QVariant("0xBEEF");
  qDebug() &lt;&lt; v; // QVariant(QString, "0xBEEF")
  v.convert(QVariant::Int);
  qDebug() &lt;&lt; v; // QVariant(int, 48879)
  v.convert(QVariant::String);
  qDebug() &lt;&lt; v; // QVariant(QString, "48879")
  </code></pre>