The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view system.
More...
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view system. A QContextMenuEvent received by a QGraphicsView is translated into a QGraphicsSceneContextMenuEvent. The QContextMenuEvent::globalPos() is translated into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).
- See also
- QGraphicsSceneMouseEvent, QGraphicsSceneWheelEvent, QContextMenuEvent
This enum describes the reason why the context event was sent.
Constant | Value | Description |
QGraphicsSceneContextMenuEvent::Mouse | 0 | The mouse caused the event to be sent. On most platforms, this means the right mouse button was clicked. |
QGraphicsSceneContextMenuEvent::Keyboard | 1 | The keyboard caused this event to be sent. On Windows and Mac OS X, this means the menu button was pressed. |
QGraphicsSceneContextMenuEvent::Other | 2 | The event was sent by some other means (i.e. not by the mouse or keyboard). |
QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent |
( |
| ) |
|
Returns the keyboard modifiers in use when the context menu was requested.
QPointF QGraphicsSceneContextMenuEvent::pos |
( |
| ) |
const |
Returns the position of the mouse cursor in item coordinates at the moment the context menu was requested.
- See also
- scenePos(), screenPos()
Reason QGraphicsSceneContextMenuEvent::reason |
( |
| ) |
const |
QPointF QGraphicsSceneContextMenuEvent::scenePos |
( |
| ) |
const |
Returns the position of the mouse cursor in scene coordinates at the moment the context menu was requested.
- See also
- pos(), screenPos()
QPoint QGraphicsSceneContextMenuEvent::screenPos |
( |
| ) |
const |
Returns the position of the mouse cursor in screen coordinates at the moment the context menu was requested.
- See also
- pos(), scenePos()