Commit ee5dd2ad authored by Jan Arve Saether's avatar Jan Arve Saether Committed by The Qt Project
Browse files

Fix basiclayouts example so that the window can be smaller..


..than the implicit size of the layout.

Change-Id: I89ad1d91c7e492ba498acd50e2ddde9cc8e84581
Reviewed-by: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
parent a0165b63
Branches
Tags
No related merge requests found
Showing with 8 additions and 6 deletions
...@@ -49,10 +49,12 @@ import QtQuick.Layouts 1.0 ...@@ -49,10 +49,12 @@ import QtQuick.Layouts 1.0
ApplicationWindow { ApplicationWindow {
title: "Basic layouts" title: "Basic layouts"
property int margin: 11 property int margin: 11
minimumWidth: mainLayout.implicitWidth + 2 * margin width: mainLayout.implicitWidth + 2 * margin
minimumHeight: mainLayout.implicitHeight + 2 * margin height: mainLayout.implicitHeight + 2 * margin
width: minimumWidth minimumWidth: mainLayout.Layout.minimumWidth + 2 * margin
height: minimumHeight minimumHeight: mainLayout.Layout.minimumHeight + 2 * margin
maximumWidth: mainLayout.Layout.maximumWidth + 2 * margin
maximumHeight: mainLayout.Layout.maximumHeight + 2 * margin
ColumnLayout { ColumnLayout {
id: mainLayout id: mainLayout
...@@ -111,8 +113,8 @@ ApplicationWindow { ...@@ -111,8 +113,8 @@ ApplicationWindow {
TextArea { TextArea {
id: t3 id: t3
text: "This fills the whole cell" text: "This fills the whole cell"
Layout.preferredWidth: 200 Layout.minimumHeight: 30
Layout.preferredHeight: 400 Layout.maximumHeight: 300
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment