summaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2020-06-02 16:29:04 +0200
committerJan Arve Sæther <jan-arve.saether@qt.io>2020-06-04 08:50:28 +0200
commit3122236e7bcd035b9a388cc4ab6aa91d1541ef29 (patch)
tree4e7c17b0c9dec337745e695fa64ee40be932d269 /examples/quick
parent9467165dbb4e8c3208c4eba458810002a1fbfe45 (diff)
Fix some bugs in the example that was introduced by moving over to QQC2
Most of the bugs was due to moving over to Qt Quick Controls 2, except from the binding we had to explicitly break now. That should probably have been done when we used Qt Quick Controls too. Change-Id: Ic558679802ea35e727eadc570cf299f9da4a3604 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/layouts/layouts.qml14
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/quick/layouts/layouts.qml b/examples/quick/layouts/layouts.qml
index 76afa02e4a..8a1cb20d22 100644
--- a/examples/quick/layouts/layouts.qml
+++ b/examples/quick/layouts/layouts.qml
@@ -58,8 +58,12 @@ ApplicationWindow {
visible: true
title: "Basic layouts"
property int margin: 11
- width: mainLayout.implicitWidth + 2 * margin
- height: mainLayout.implicitHeight + 2 * margin
+
+ Component.onCompleted: {
+ width = mainLayout.implicitWidth + 2 * margin
+ height = mainLayout.implicitHeight + 2 * margin
+ }
+
minimumWidth: mainLayout.Layout.minimumWidth + 2 * margin
minimumHeight: mainLayout.Layout.minimumHeight + 2 * margin
@@ -71,6 +75,7 @@ ApplicationWindow {
id: rowBox
title: "Row layout"
Layout.fillWidth: true
+ Layout.minimumWidth: rowLayout.Layout.minimumWidth + 30
RowLayout {
id: rowLayout
@@ -89,6 +94,7 @@ ApplicationWindow {
id: gridBox
title: "Grid layout"
Layout.fillWidth: true
+ Layout.minimumWidth: gridLayout.Layout.minimumWidth + 30
GridLayout {
id: gridLayout
@@ -107,9 +113,12 @@ ApplicationWindow {
TextArea {
text: "This widget spans over three rows in the GridLayout.\n"
+ "All items in the GridLayout are implicitly positioned from top to bottom."
+ wrapMode: TextArea.WordWrap
Layout.rowSpan: 3
Layout.fillHeight: true
Layout.fillWidth: true
+ Layout.minimumHeight: implicitHeight
+ Layout.minimumWidth: 100 // guesstimate, should be size of largest word
}
}
}
@@ -125,6 +134,7 @@ ApplicationWindow {
title: "Stack layout"
implicitWidth: 200
implicitHeight: 60
+ Layout.minimumHeight: 60
Layout.fillWidth: true
Layout.fillHeight: true
StackLayout {