title: How to open a dialog from a MenuBar QML
body: <p>I'm trying to open a "About" dialog from the menubar.</p>
  
  <p>I have a MainMenuBar.qml that looks like this:</p>
  
  <pre><code>import QtQuick 2.12
  import './dialogs'
  
  Labs.MenuBar {
  
      // Various menus omitted
  
      AboutDialog {
          id: about_dialog
      }
  
      Labs.Menu {
          title: qsTr('&amp;Help')
  
          Labs.MenuItem {
              text: qsTr('&amp;About')
              onTriggered: about_dialog.open()
          }
      }
  }
  </code></pre>
  
  <p>And my AboutDialog.qml:</p>
  
  <pre><code>import QtQuick.Controls 2.13
  import QtQuick.Layouts 1.13
  
  Dialog {
      title: qsTr('id_about')
      width: 500
      height: 350
      standardButtons: Dialog.Ok
  
      Page {
          anchors.fill: parent
  
          header: RowLayout {
              Image {
                  Layout.margins: 16
                  source: "../ic_home.png"
              }
          }
  
          Label {
              anchors.fill: parent
              anchors.margins: 32
              wrapMode: Text.WordWrap
              text: qsTr("Hello world")
          }
      }
  }
  </code></pre>
  
  <p>When clicking "About" I get: </p>
  
  <blockquote>
    <p>/src/MainMenuBar.qml: QML Dialog: cannot find any window to open popup in.</p>
  </blockquote>
  
  <p>I suppose that happens because I am opening it from the menubar and not from a window - is that possible? What should I do?</p>