diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2024-06-12 13:50:31 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2024-06-20 11:05:29 +0200 |
commit | 7ceaa9693e1911fafb366e50800b248cb5588def (patch) | |
tree | 779ad7950d4c1bbd4e43c89c0614ef4eb204b0b8 /src/qml/common/common.pri | |
parent | 2370cb0eb9f9be62472a84247a3933d176b4cef4 (diff) |
We currently allow a child menu to have a popupType
different from the parent menu. This will not work in
practice, since all menus in the same hierarchy have
to have the same type.
Rather than placing the burden on the application
developer to set the same popup type on all (sub)menus,
we let QQuickMenu do this automatically based on the
what the root menu ends up using. This is also the
documented behavior.
In order to implement this change, add a virtual
QQuickPopup::resolvedPopupType(). The other sub-classes
of QQuickPopup can then override this function and
resolve the actual popup type at run-time.
This also allows us to remove using Qt::Widget as a
popupWindowType(), since e.g a Drawer will never
resolve the popup type to be QQuickPopup::Window anyway.
Pick-to: 6.8
Change-Id: I9cf95bb02fb0a912497c77d2df25a9cb76c153cd
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/qml/common/common.pri')
0 files changed, 0 insertions, 0 deletions