title: Am I missing something, or does "qmlRegisterSingletonInstance" have a bug?
body: <p>We are getting an apparently false error message when we create a singleton instance using the new &quot;qmlRegisterSingletonInstance&quot; function. We create the instance like this in main.cpp:</p>
  <pre><code>QScopedPointer&lt;OSClog&gt; OSClog(new class OSClog);
  qmlRegisterSingletonInstance(&quot;Louma.osclog&quot;, 1, 0, &quot;OSClog&quot;, OSClog.get() );
  </code></pre>
  <p>But in our QML file, we get this error message on import, claiming the module can't be found:
  <a href="https://i.stack.imgur.com/CsBCO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CsBCO.png" alt="enter image description here" /></a></p>
  <p>But it CAN be found, and the program compiles and runs correctly.</p>
  <p>If we use a different function to create that type, the error message disappears. Using this code instead does not report the error:</p>
  <p><code>      qmlRegisterType&lt;OSClog&gt;(&quot;Louma.osclog&quot;, 1, 0, &quot;OSClog&quot; );</code></p>
  <p>Although we now need to create an instance of the component in main.qml.</p>
  <p>We've been putting up with the error message for months, as it was just a minor annoyance until now. We have just discovered that Qt-Designer refuses to load any object that includes that import statement.</p>
  <p><a href="https://i.stack.imgur.com/Bxn2M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bxn2M.png" alt="enter image description here" /></a></p>
  <p>Of course, this error is also phony, as the QML_IMPORT_PATH is correct. If we change the code away from &quot;qmlRegisterSingletonInstance&quot; to any of the other registration function, Qt-Designer works correctly.</p>
  <p>So, are we doing something wrong with &quot;qmlRegisterSingletonInstance&quot;? Or is this a bug?</p>
  <p>Thanks.</p>