From dd72694b6046d98a64bd99361ed9cb4613af78f8 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Thu, 30 Nov 2023 12:52:36 +0100 Subject: Adapt layouts to take advantage of new size policy information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The size policy been defined for QQuickItem and its subclasses (as part of task QTBUG-117597). This commit adds code so that Qt Quick Layouts will effectively use them. It also have an opt-out code path by testing for QGuiApplication::testAttribute(Qt::AA_QtQuickDontUseDefaultSizePolicy) Task-number: QTBUG-117597 Pick-to: 6.7 Change-Id: I624509a77a870d72a5c4ce96505516bf30801559 Reviewed-by: Jan Arve Sæther --- src/qmltest/quicktest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qmltest') diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index a10bbb0a15..c91c49ab79 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -429,6 +429,7 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD int quick_test_main_with_setup(int argc, char **argv, const char *name, const char *sourceDir, QObject *setup) { QScopedPointer app; + app->setAttribute(Qt::AA_QtQuickDontUseDefaultSizePolicy); if (!QCoreApplication::instance()) app.reset(new QGuiApplication(argc, argv)); -- cgit v1.2.3