title: Qt Meta System Call constructor with parameters
body: <p>I know that I can use <code>QMetaType</code> to create an object without parameters.</p>
  
  <p>Another possible option is to use <code>QMetaObject</code> and call <code>newInstance</code>. But I need to get <code>QMetaObject</code> from something. </p>
  
  <p>I tried to use <code>QMetaType::metaObjectForType</code>, but it always returns null pointer (but <code>QMetaType</code> is able to create the object).</p>
  
  <pre><code>QMetaObject const* metaObject = QMetaType::metaObjectForType(id); // return null pointer
     QObject*           object     =   (QObject*)QMetaType::create(id); // create the object
  QMetaObject const* metaObject = object-&gt;metaObject(); // return not-null pointer
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I think the question is why <code>metaObjectForType</code> does not work for me.
  The class is registered with <code>qRegisterMetaType</code>, also <code>Q_DECLARE_METATYPE</code> and <code>Q_OBJECT</code> are applied.</p>