title: Hot reload QML when using ApplicationWindow
body: <p>Has anyone been able to hot reload all QML files when using a <code>ApplicationWindow</code>? I found a few examples like <a href="https://qml.guide/live-reloading-hot-reloading-qml/" rel="noreferrer">https://qml.guide/live-reloading-hot-reloading-qml/</a> and <a href="https://www.slideshare.net/ICSinc/how-best-to-realize-a-runtime-reload-of-qml" rel="noreferrer">https://www.slideshare.net/ICSinc/how-best-to-realize-a-runtime-reload-of-qml</a>, but mostly they use <code>Loader</code> and as <code>ApplicationWindow</code> needs to be the root item, this does not work (no window appears) to just reload all QML stuff.</p>
  
  <p>I tried:</p>
  
  <pre><code>ApplicationWindow {
      id: window
      visibility: "FullScreen"
  
      Shortcut {
          sequence: "F5"
          context: Qt.ApplicationShortcut
          onActivated: {
              window.close();
              app.loadQml();
          }
      }
      ...
  }
  </code></pre>
  
  <p>where <code>app</code> is a context property I set on C++ side and the function does:</p>
  
  <pre><code>void App::loadQml()
  {
      qml_engine_.clearComponentCache();
      // Use "qrc:/Main.qml" for Qt Resource System.
      // Use "Main.qml" for file system.
      qml_engine_.load(QUrl(QStringLiteral("Main.qml")));
  }
  </code></pre>
  
  <p>This code kind of works once, the window dis- and reapears but the shortcut only works once but no second time...</p>
  
  <p>Any ideas how to implement this?</p>