From 2952470f1f478a94238eb2e9f08e6fc40b816424 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether <jan-arve.saether@digia.com> Date: Fri, 22 Mar 2013 22:04:43 +0100 Subject: [PATCH] Improve basiclayouts example now when GroupBox is fixed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now when it is possible to modify the content rect of a GroupBox, we can finally have a resizable layout in the GroupBox. Change-Id: I8afc4474c222eda790e52a82de00b5439942efeb Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> --- examples/basiclayouts/main.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/basiclayouts/main.qml b/examples/basiclayouts/main.qml index 2e338a81b..a5ef9416e 100644 --- a/examples/basiclayouts/main.qml +++ b/examples/basiclayouts/main.qml @@ -62,11 +62,14 @@ ApplicationWindow { GroupBox { id: rowBox title: "Row layout" - + contentWidth: rowLayout.implicitWidth + contentHeight: rowLayout.implicitHeight Layout.fillWidth: true + RowLayout { id: rowLayout spacing: 6 + anchors.fill: parent Button { text: "Button 1" } @@ -79,17 +82,24 @@ ApplicationWindow { Button { text: "Button 4" } + Item { + Layout.fillWidth: true + } } } GroupBox { id: gridBox title: "Grid layout" + contentWidth: gridLayout.implicitWidth + contentHeight: gridLayout.implicitHeight Layout.fillWidth: true + GridLayout { id: gridLayout rowSpacing: 6 columnSpacing: 6 + anchors.fill: parent Label { text: "Line 1" Layout.row: 0 -- GitLab