From ee5dd2add584954a6d7415a380fcd68640f675a5 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether <jan-arve.saether@digia.com> Date: Wed, 8 May 2013 16:42:27 +0200 Subject: [PATCH] Fix basiclayouts example so that the window can be smaller.. ..than the implicit size of the layout. Change-Id: I89ad1d91c7e492ba498acd50e2ddde9cc8e84581 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> --- examples/quick/controls/basiclayouts/main.qml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/quick/controls/basiclayouts/main.qml b/examples/quick/controls/basiclayouts/main.qml index 7b83a2e07..6ce18fefd 100644 --- a/examples/quick/controls/basiclayouts/main.qml +++ b/examples/quick/controls/basiclayouts/main.qml @@ -49,10 +49,12 @@ import QtQuick.Layouts 1.0 ApplicationWindow { title: "Basic layouts" property int margin: 11 - minimumWidth: mainLayout.implicitWidth + 2 * margin - minimumHeight: mainLayout.implicitHeight + 2 * margin - width: minimumWidth - height: minimumHeight + width: mainLayout.implicitWidth + 2 * margin + height: mainLayout.implicitHeight + 2 * margin + minimumWidth: mainLayout.Layout.minimumWidth + 2 * margin + minimumHeight: mainLayout.Layout.minimumHeight + 2 * margin + maximumWidth: mainLayout.Layout.maximumWidth + 2 * margin + maximumHeight: mainLayout.Layout.maximumHeight + 2 * margin ColumnLayout { id: mainLayout @@ -111,8 +113,8 @@ ApplicationWindow { TextArea { id: t3 text: "This fills the whole cell" - Layout.preferredWidth: 200 - Layout.preferredHeight: 400 + Layout.minimumHeight: 30 + Layout.maximumHeight: 300 Layout.fillHeight: true Layout.fillWidth: true } -- GitLab