title: Cannot create certain QML types in a singleton
body: <p>I have a QML singleton for use in styling defined as follows:</p>
  
  <pre><code>pragma Singleton
  import QtQuick 2.2
  import QtQuick.Controls 1.1
  import QtQuick.Controls.Styles 1.1
  
  QtObject {
      property ProgressBarStyle progressBarErrorStyle: ProgressBarStyle {
          background: Rectangle {
              radius: 2
              color: "lightgray"
              border.color: "gray"
              border.width: 1
              implicitWidth: 200
              implicitHeight: 20
          }
          progress: Rectangle {
              color: "orangered"
              border.color: "red"
          }
      }
  }
  </code></pre>
  
  <p>I'm able to import the object and use it, however <code>progressBarErrorStyle</code> is always given the type <code>ProgressBarStyle_QMLTYPE_17</code>. If I change it to a <code>Rectangle</code>, then it is correctly typed as <code>QQuickRectangle</code>.</p>
  
  <p>The <code>QtQuick.Controls.Styles</code> import defines <code>ProgressBarStyle</code>, and in QtCreator I'm not getting any syntax errors... so why is my object given the wrong type at runtime?</p>