QContextMenuEvent received by a
QGraphicsView is translated into a
QGraphicsSceneContextMenuEvent . The
globalPos() is translated into item, scene, and screen coordinates (
scenePos() , and
- class PySide6.QtWidgets.QGraphicsSceneContextMenuEvent([type=QEvent.Type.None])¶
This enum describes the reason why the context event was sent.
The mouse caused the event to be sent. On most platforms, this means the right mouse button was clicked.
The keyboard caused this event to be sent. On Windows and macOS, this means the menu button was pressed.
The event was sent by some other means (i.e. not by the mouse or keyboard).
- Return type
Returns the keyboard modifiers in use when the context menu was requested.
Returns the position of the mouse cursor in item coordinates at the moment the context menu was requested.
Returns the reason for the context menu event.
Returns the position of the mouse cursor in scene coordinates at the moment the context menu was requested.
Returns the position of the mouse cursor in screen coordinates at the moment the context menu was requested.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.