title: QML ApplicationWindow: set minimum size to fit content
body: <p>I would like to set the minimum width and height of my QML Application window, so that the content item is fully visible (not clipped).</p>
  
  <pre><code>import QtQuick 2.5
  import QtQuick.Controls 1.4
  
  ApplicationWindow {
      visible: true
      width: 100
      height: 100
  
      title: "test"
  
      minimumWidth: circle.width
      minimumHeight: circle.height // + menuBar.height
  
      menuBar: MenuBar {
          Menu {
              title: qsTr("File")
              MenuItem {
                  text: qsTr("Exit")
                  onTriggered: Qt.quit();
              }
          }
      }
  
      Rectangle {
          id: circle
          anchors.centerIn: parent
          width: 200
          height: 200
          color: "red"
          radius: width * 0.5
      }
  }
  </code></pre>
  
  <p>Here is the result:</p>
  
  <p><a href="https://i.stack.imgur.com/tE80f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tE80f.png" alt="enter image description here"></a></p>
  
  <p>As you can see, setting the minimum width works fine. The minimum height seems to be off by the height of the menu bar. The problem is, adding something like <code>menuBar.height</code> does not work as this property does not exist.</p>
  
  <p>So the question is: how do I set the size of the ApplicationWindow, so that the content item (given by <code>width</code>/<code>height</code> or <code>implicitWidth</code>/<code>implicitHeight</code>) is not clipped?</p>
  
  <p>Note: In reality, instead of a red circle, the content item serves as a game canvas, which I would like to resize dynamically.</p>