title: Qt: How does QGuiApplication and QQmlApplicationEngine interact?
body: <p>I am trying to understand the underlying magic behind Qt. It seems that I am missing an important concept in how QML and C++ interact. </p>
  
  <p>In the following "Hello World" demo, the most basic, an app is declared, an engine is declared, then an app is executed.</p>
  
  <p>Nowhere at this level we are telling the app to use the engine. How does qt know?</p>
  
  <pre><code>int main(int argc, char *argv[])
  {
    QGuiApplication app(argc, argv);
  
    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
  
    return app.exec();
  }
  </code></pre>