diff options
| author | Shawn Rutledge <shawn.rutledge@qt.io> | 2024-11-12 10:04:31 +0100 |
|---|---|---|
| committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2024-12-07 08:27:51 +0100 |
| commit | 84a5f50c7766c99f62b22bb4388137e0aa8dd13d (patch) | |
| tree | 5bfba5ae3ef25ea8cd8ab0d039521d155477aa32 /src/corelib/plugin/quuid.cpp | |
| parent | 953b7aaddc7579a253cd15562de6eec9476245e4 (diff) | |
Move QContextMenuEvent synthesis from QWidgetWindow to QWindow
...and only if the original mouse event is not accepted. To that end,
QGraphicsView must setAccepted(false) if the graphics scene did not
accept the QGraphicsSceneMouseEvent.
So a widget or a Qt Quick item or handler can handle the mouse events
directly, to provide a consistent context-menu experience across
platforms (for example to handle the press-drag-release gesture),
but the fallback pattern follows the platform behavior.
QWidgetWindow::handleMouseEvent() picks the receiver in its own way:
often a leaf widget. It sets qt_last_mouse_receiver, so
QWidgetWindow::handleContextMenuEvent() can deliver a mouse-originating
QContextMenuEvent to the same receiver. A keyboard-originating
QContextMenuEvent is delivered to the focus widget instead, as before.
As a drive-by: fix an awkward word in qCDebug output.
Task-number: QTBUG-93486
Change-Id: I4c1499120851a899acf2d7d4adaedaf9f42c3126
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/corelib/plugin/quuid.cpp')
0 files changed, 0 insertions, 0 deletions
