title: Qt 5.0: Exposing C++ methods to Java Script
body: <p>I try to expose an object as a global property to Java Script which has the method below:</p>
  
  <pre><code>Q_INVOKABLE MyObject* createMyObject();
  </code></pre>
  
  <p>MyObject is derived from QObject.</p>
  
  <p>when I call this method in Java Script it returns an object of type:</p>
  
  <pre><code>QVariant(MyObject*)
  </code></pre>
  
  <p>I'm wondering if it's possible to automatically convert it to QJSValue so I can use it further in the script?</p>