diff options
author | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-06-01 11:39:59 +0200 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-06-20 08:09:53 +0000 |
commit | a8d7bd1701cc5c204891346fd42f8c6189df3cee (patch) | |
tree | 5c734cf421becab17ee9cfe1b460c91758747725 /tests/qml/windowitem/apps/test.windowitem.app/main.qml | |
parent | 715c5627346057810c6a267af736a2d736c9cb22 (diff) | |
download | qtapplicationmanager-a8d7bd1701cc5c204891346fd42f8c6189df3cee.tar.gz |
Window size and WindowItem implicit size
* Add a Window::size property
* Make the implicit size of a WindowItem be the size of the
Window it is displaying
Therefore it's now possible for an application to define the size of
its window and have System UI follow it if it so desires (as System UI
can ignore the implicit size and specify a value of its own).
Change-Id: I7998586399a5b16a7adf8a83db51fe6686191f1e
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'tests/qml/windowitem/apps/test.windowitem.app/main.qml')
-rw-r--r-- | tests/qml/windowitem/apps/test.windowitem.app/main.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/qml/windowitem/apps/test.windowitem.app/main.qml b/tests/qml/windowitem/apps/test.windowitem.app/main.qml index e4f3a826..fe7a3ed1 100644 --- a/tests/qml/windowitem/apps/test.windowitem.app/main.qml +++ b/tests/qml/windowitem/apps/test.windowitem.app/main.qml @@ -45,8 +45,20 @@ import QtApplicationManager 1.0 ApplicationManagerWindow { id: root + width: 123 + height: 321 + Rectangle { anchors.fill: parent color: "red" } + + // A way for test code to trigger ApplicationManagerWindow's size changes from + // the client side + onWindowPropertyChanged: { + if (name === "requestedWidth") + root.width = value; + else if (name === "requestedHeight") + root.height = value; + } } |