diff options
author | Ali Kianian <ali.kianian@qt.io> | 2024-01-23 10:31:30 +0200 |
---|---|---|
committer | Ali Kianian <ali.kianian@qt.io> | 2024-01-23 09:21:00 +0000 |
commit | 362e6f7b73731ef123bc521cf7faa487219914e3 (patch) | |
tree | 38a33fd59c31f96da9daabff2eaf64f1e23b6ec5 | |
parent | 14b63a2ba0ba854853c88a291397d13e6d710d5f (diff) |
QmlDesigner: Close the header context menu on click
Since the context menu is defined inside the horizontal header view,
it didn't close by clicking on another column. The reason is that the
close policy works when we click outside the parent.
To resolve this, we can simply close the menu when the user clicks
on the header scope.
For right clicks, it's not mandatory to close the menu, since it will
be moved and opened again.
Fixes: QDS-11731
Change-Id: I5e0bb4c88dafdc54d0900a4c9e3bb584243373e4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Shrief Gabr <shrief.gabr@qt.io>
-rw-r--r-- | share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml index 6f606c4aab..2bfd33b54c 100644 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml +++ b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml @@ -106,6 +106,8 @@ Rectangle { headerMenu.clickedHeaderIndex = index headerMenu.dialogPos = parent.mapToGlobal(posX, parent.height) headerMenu.popup() + } else { + headerMenu.close() } } } |