From bb61ff917553adb54264eba057407ab16aa05ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Tue, 12 Dec 2023 12:51:11 +0100 Subject: [PATCH] Add Qt::AA_QtQuickDontUseDefaultSizePolicy This flag should be set in order to opt out of that Qt Quick Layouts takes implicit (built-in) size policies into account, a feature that was introduced in Qt 6.7 Task-number: QTBUG-117597 Change-Id: I206cd61534b2103b2c3a9b4abc97fec8c88799d1 Reviewed-by: Santhosh Kumar (cherry picked from commit 4ae537e67c99160f5dcac99f40d03a7921456556) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qnamespace.h | 2 +- src/corelib/global/qnamespace.qdoc | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index b6f12a625f3..bd9786ec3ad 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -422,7 +422,7 @@ namespace Qt { enum ApplicationAttribute { // AA_ImmediateWidgetCreation = 0, - // AA_MSWindowsUseDirect3DByDefault = 1, + AA_QtQuickDontUseDefaultSizePolicy = 1, AA_DontShowIconsInMenus = 2, AA_NativeWindows = 3, AA_DontCreateNativeWidgetSiblings = 4, diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 30a0c05cc49..2d3f9749fbd 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -84,6 +84,11 @@ QCoreApplication::testAttribute(). + \value [since 6.7] AA_QtQuickDontUseDefaultSizePolicy Qt Quick Layouts won't use the built-in + size policy of \l Item. This restores previous behavior where all items were fixed size + by default. Size policy can be customized by explicitly setting + \l{Layout::fillWidth}{Layout.fillWidth} or \l{Layout::fillHeight}{Layout.fillHeight}. + \value AA_DontShowIconsInMenus Actions with the Icon property won't be shown in any menus unless specifically set by the QAction::iconVisibleInMenu property.