summaryrefslogtreecommitdiff
path: root/src/controls/ApplicationWindow.qml
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-10-16 14:02:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-25 15:07:33 +0200
commit3fdea4f160cbcf9a5c906c8ee05e8361f111a7ec (patch)
tree4d8720a54b73c7e4e8b2688c0a0e2e89cf69473e /src/controls/ApplicationWindow.qml
parent2f77a972eafacebcc5a44204dbf577258de1c4a1 (diff)
downloadqtquickcontrols-3fdea4f160cbcf9a5c906c8ee05e8361f111a7ec.tar.gz
Adjust height if the ToolBar or StatusBar is dynamically hidden
Triggered by a manual test I'm working on Change-Id: I8d49a7d19ac7daebda388df8e2d8595607fdd52c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/ApplicationWindow.qml')
-rw-r--r--src/controls/ApplicationWindow.qml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/controls/ApplicationWindow.qml b/src/controls/ApplicationWindow.qml
index 43bc9889..564e8d2a 100644
--- a/src/controls/ApplicationWindow.qml
+++ b/src/controls/ApplicationWindow.qml
@@ -145,7 +145,8 @@ Window {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
- height: childrenRect.height
+ implicitHeight: childrenRect.height
+ height: visibleChildren.length > 0 ? implicitHeight: 0
}
Item {
@@ -153,7 +154,8 @@ Window {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
- height: childrenRect.height
+ implicitHeight: childrenRect.height
+ height: visibleChildren.length > 0 ? implicitHeight: 0
}
onVisibleChanged: if (visible && menuBar) menuBar.__parentWindow = root