diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2014-08-27 08:55:36 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@digia.com> | 2014-08-28 09:38:52 +0200 |
commit | 4648dc566f72454fb49142b9f55929c9b9502853 (patch) | |
tree | aa8570534bde9e656e82a0c9c63f87e6767b35a2 /tests/auto/controls/data/tst_applicationwindow.qml | |
parent | 6492a65d280e5b6a916f52498a9e39005cc2d51f (diff) | |
download | qtquickcontrols-4648dc566f72454fb49142b9f55929c9b9502853.tar.gz |
Include potential toolBar+menuBar+statusBar when calculating height
Change-Id: Id005e81656f1fc2085360240bfd30342c0e7954b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_applicationwindow.qml')
-rw-r--r-- | tests/auto/controls/data/tst_applicationwindow.qml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_applicationwindow.qml b/tests/auto/controls/data/tst_applicationwindow.qml index 72dfb1cd..a746f276 100644 --- a/tests/auto/controls/data/tst_applicationwindow.qml +++ b/tests/auto/controls/data/tst_applicationwindow.qml @@ -260,5 +260,37 @@ TestCase { window.destroy() } + function test_windowHeight() { + var test_control = 'import QtQuick 2.2; \ + import QtQuick.Controls 1.2; \ + ApplicationWindow { \ + toolBar: ToolBar { \ + ToolButton { \ + text: "Menu" \ + } \ + } \ + statusBar: StatusBar { \ + Row { \ + Label { \ + text: "Window test" \ + } \ + } \ + } \ + \ + Rectangle { \ + anchors.fill: parent; \ + implicitWidth: 300; \ + implicitHeight: 300; \ + } \ + } ' + + var window = Qt.createQmlObject(test_control, container, '') + window.visible = true + waitForRendering(window.contentItem) + compare(window.contentItem.implicitHeight, 300) + verify(window.height > 300) + window.destroy() + } + } } |