diff options
author | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-01-19 18:06:58 +0100 |
---|---|---|
committer | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-02-21 14:27:54 +0100 |
commit | 8d3ed392bb51dc70c04aa521f1380616a78be7a9 (patch) | |
tree | cbc8915d96f43b3e94e562ba1128b0508dc59d59 /examples/quick | |
parent | 7b4221002e12716868ff21d462bc427795db4e37 (diff) |
Update manual tests and examples for change in default size policy
The size policy of item updated as part of task QTBUG-117597. This
patch update existing examples and manual tests that depends on quick
layout to embrace size policy change.
Task-number: QTBUG-117597
Pick-to: 6.7
Change-Id: I68469a3bba3c4d3e5ed4b6eae0fd765b5206efc0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/layouts/layouts.qml | 3 | ||||
-rw-r--r-- | examples/quick/localstorage/Header.qml | 3 | ||||
-rw-r--r-- | examples/quick/localstorage/localstorage.qml | 6 | ||||
-rw-r--r-- | examples/quick/responsivelayouts/responsivelayouts.qml | 1 | ||||
-rw-r--r-- | examples/quick/scenegraph/rhitextureitem/main.qml | 6 | ||||
-rw-r--r-- | examples/quick/tableview/gameoflife/main.qml | 3 |
6 files changed, 22 insertions, 0 deletions
diff --git a/examples/quick/layouts/layouts.qml b/examples/quick/layouts/layouts.qml index ded8ccbf95..92fe305559 100644 --- a/examples/quick/layouts/layouts.qml +++ b/examples/quick/layouts/layouts.qml @@ -30,6 +30,7 @@ ApplicationWindow { id: rowBox title: qsTr("Row layout") Layout.fillWidth: true + Layout.fillHeight: false Layout.minimumWidth: rowLayout.Layout.minimumWidth + 30 RowLayout { @@ -41,6 +42,7 @@ ApplicationWindow { } Button { text: qsTr("Button") + Layout.fillWidth: false } } } @@ -49,6 +51,7 @@ ApplicationWindow { id: gridBox title: qsTr("Grid layout") Layout.fillWidth: true + Layout.fillHeight: false Layout.minimumWidth: gridLayout.Layout.minimumWidth + 30 GridLayout { diff --git a/examples/quick/localstorage/Header.qml b/examples/quick/localstorage/Header.qml index 047e49a839..a539452844 100644 --- a/examples/quick/localstorage/Header.qml +++ b/examples/quick/localstorage/Header.qml @@ -99,6 +99,7 @@ Item { font.pixelSize: 22 activeFocusOnPress: true activeFocusOnTab: true + Layout.fillWidth: false ToolTip { x: parent.width + 3 @@ -130,6 +131,7 @@ Item { font.pixelSize: 22 activeFocusOnPress: true activeFocusOnTab: true + Layout.fillWidth: false onFocusChanged: if (focus) oldString = descInput.text onEditingFinished: function() { if (descInput.text.length < 8 && descInput.text !== descInput.oldString && root.enabled) @@ -143,6 +145,7 @@ Item { font.pixelSize: 22 activeFocusOnPress: true activeFocusOnTab: true + Layout.fillWidth: false validator: RegularExpressionValidator { regularExpression: /\d{1,3}/ } diff --git a/examples/quick/localstorage/localstorage.qml b/examples/quick/localstorage/localstorage.qml index 77bf63adf0..3bed3e99df 100644 --- a/examples/quick/localstorage/localstorage.qml +++ b/examples/quick/localstorage/localstorage.qml @@ -37,6 +37,7 @@ Window { RowLayout { Button { text: qsTr("New") + Layout.fillWidth: false onClicked: { input.initrec_new() window.creatingNewEntry = true @@ -47,6 +48,7 @@ Window { id: saveButton enabled: (window.creatingNewEntry || window.editingEntry) && listView.currentIndex !== -1 text: qsTr("Save") + Layout.fillWidth: false onClicked: { let insertedRow = false; if (listView.model.get(listView.currentIndex).id < 1) { @@ -80,6 +82,7 @@ Window { id: editButton text: qsTr("Edit") enabled: !window.creatingNewEntry && !window.editingEntry && listView.currentIndex !== -1 + Layout.fillWidth: false onClicked: { input.editrec(listView.model.get(listView.currentIndex).date, listView.model.get(listView.currentIndex).trip_desc, @@ -93,6 +96,7 @@ Window { id: deleteButton text: qsTr("Delete") enabled: !window.creatingNewEntry && listView.currentIndex !== -1 + Layout.fillWidth: false onClicked: { JS.dbDeleteRow(listView.model.get(listView.currentIndex).id) listView.model.remove(listView.currentIndex, 1) @@ -107,6 +111,7 @@ Window { id: cancelButton text: qsTr("Cancel") enabled: (window.creatingNewEntry || window.editingEntry) && listView.currentIndex !== -1 + Layout.fillWidth: false onClicked: { if (listView.model.get(listView.currentIndex).id === 0) { // This entry had an id of 0, which means it was being created and hadn't @@ -121,6 +126,7 @@ Window { } Button { text: qsTr("Exit") + Layout.fillWidth: false onClicked: Qt.quit() } } diff --git a/examples/quick/responsivelayouts/responsivelayouts.qml b/examples/quick/responsivelayouts/responsivelayouts.qml index 4762c2c923..f9ef99612d 100644 --- a/examples/quick/responsivelayouts/responsivelayouts.qml +++ b/examples/quick/responsivelayouts/responsivelayouts.qml @@ -138,6 +138,7 @@ Window { LayoutItemProxy { Layout.fillHeight: true + Layout.fillWidth: false target: contentItem } } diff --git a/examples/quick/scenegraph/rhitextureitem/main.qml b/examples/quick/scenegraph/rhitextureitem/main.qml index 2c7a4fbe0d..dd664eaa57 100644 --- a/examples/quick/scenegraph/rhitextureitem/main.qml +++ b/examples/quick/scenegraph/rhitextureitem/main.qml @@ -172,6 +172,7 @@ Item { from: 8 to: 2048 value: 128 + Layout.fillWidth: false } } @@ -197,6 +198,7 @@ Item { from: 0 to: 1.0 value: 1.0 + Layout.fillWidth: false } } @@ -234,18 +236,22 @@ Item { id: rdFormatRGBA8 text: qsTr("8-bit RGBA") checked: true + Layout.fillWidth: false } RadioButton { id: rdFormatFP16 text: qsTr("Half-float RGBA") + Layout.fillWidth: false } RadioButton { id: rdFormatFP32 text: qsTr("Float RGBA") + Layout.fillWidth: false } RadioButton { id: rdFormatRGB10A2 text: qsTr("10-bit RGB, 2-bit A") + Layout.fillWidth: false } } } diff --git a/examples/quick/tableview/gameoflife/main.qml b/examples/quick/tableview/gameoflife/main.qml index bedb624223..55c5b193f8 100644 --- a/examples/quick/tableview/gameoflife/main.qml +++ b/examples/quick/tableview/gameoflife/main.qml @@ -74,6 +74,7 @@ ApplicationWindow { text: qsTr("Next") onClicked: gameOfLifeModel.nextStep() Layout.rightMargin: 50 + Layout.fillWidth: false } //! [next] @@ -82,10 +83,12 @@ ApplicationWindow { from: 0 to: 1 value: 0.9 + Layout.fillWidth: false } Button { text: timer.running ? "❙❙" : "▶️" + Layout.fillWidth: false onClicked: timer.running = !timer.running } } |