summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2014-08-27 08:55:36 +0200
committerJan Arve Sæther <jan-arve.saether@digia.com>2014-08-28 09:38:52 +0200
commit4648dc566f72454fb49142b9f55929c9b9502853 (patch)
treeaa8570534bde9e656e82a0c9c63f87e6767b35a2 /tests
parent6492a65d280e5b6a916f52498a9e39005cc2d51f (diff)
downloadqtquickcontrols-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')
-rw-r--r--tests/auto/controls/data/tst_applicationwindow.qml32
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()
+ }
+
}
}