From 953f70179969b0beb797607c5454e36349319929 Mon Sep 17 00:00:00 2001 From: Oliver Eftevaag Date: Tue, 26 Mar 2024 14:05:01 +0100 Subject: [PATCH] Add AA_DontUsePopupWindows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want QQuickPopup to open a top-level window in qt quick, by default. But also allow users to opt out, and revert back to the old behavior. It makes sense to have an application wide setting for this, in order to allow application developer to opt out of the new default behavior, without having to change a property for every instance of Popup. While QCoreApplicationPrivate::attribs bearly has any available bits, it appear that bit 30 is available, since AA_DisableWindowContextHelpButton was commented out. Task-number: QTBUG-121363 Change-Id: I6b2759d89b46aa5d08222c2611eaffe855cc425c Reviewed-by: Qt CI Bot Reviewed-by: Tor Arne Vestbø Reviewed-by: Richard Moe Gustavsen --- 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 1aa694ef2c..4d3b6ab099 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -461,7 +461,7 @@ namespace Qt { AA_DisableShaderDiskCache = 27, AA_DontShowShortcutsInContextMenus = 28, AA_CompressTabletEvents = 29, - // AA_DisableWindowContextHelpButton = 30, + AA_DontUsePopupWindows = 30, AA_DisableSessionManager = 31, // Add new attributes before this line diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 86065c5917..f3796639c1 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -279,6 +279,11 @@ level windows, unless required by the implementation. This value was added in Qt 6.8. + \value AA_DontUsePopupWindows When this attribute is set, popups will always appear + as items in the scene, rather than having their own dedicated windows. + Setting this attribute will only affect Qt Quick applications. + This value was added in Qt 6.8. + \omitvalue AA_AttributeCount \omitvalue AA_EnableHighDpiScaling \omitvalue AA_UseHighDpiPixmaps