Skip to content

Commit

Permalink
Accept QContextMenuEvent in ContextMenu
Browse files Browse the repository at this point in the history
In case QQuickDeliveryAgentPrivate::deliverContextMenuEvent() doesn't
choose the correct target the first time, we need to let it propagate,
as with all other input events. But it should stop when it's actually
handled.

Pick-to: 6.9
Change-Id: I086f87a90c596d93688033f1ae63f258f508d36e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
  • Loading branch information
ec1oud committed Dec 25, 2024
1 parent 04d7534 commit 7ed50b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/quicktemplates/qquickcontextmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ bool QQuickContextMenu::eventFilter(QObject *object, QEvent *event)
const QPoint posRelativeToParent(attacheeItem->mapFromScene(contextMenuEvent->pos()).toPoint());
qCDebug(lcContextMenu) << this << "is showing menu instance" << menu << "at" << posRelativeToParent;
menu->popup(posRelativeToParent);
event->accept();
return true;
}
default:
Expand Down

0 comments on commit 7ed50b4

Please sign in to comment.