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.