QGraphicsSceneContextMenuEvent

Synopsis

Functions

Detailed Description

class PySide.QtGui.QGraphicsSceneContextMenuEvent([type=None])
Parameters:typePySide.QtCore.QEvent.Type

Constructs a graphics scene context menu event of the specified type .

PySide.QtGui.QGraphicsSceneContextMenuEvent.Reason

This enum describes the reason why the context event was sent.

Constant Description
QGraphicsSceneContextMenuEvent.Mouse The mouse caused the event to be sent. On most platforms, this means the right mouse button was clicked.
QGraphicsSceneContextMenuEvent.Keyboard The keyboard caused this event to be sent. On Windows and Mac OS X, this means the menu button was pressed.
QGraphicsSceneContextMenuEvent.Other The event was sent by some other means (i.e. not by the mouse or keyboard).
PySide.QtGui.QGraphicsSceneContextMenuEvent.modifiers()
Return type:PySide.QtCore.Qt.KeyboardModifiers

Returns the keyboard modifiers in use when the context menu was requested.

PySide.QtGui.QGraphicsSceneContextMenuEvent.pos()
Return type:PySide.QtCore.QPointF

Returns the position of the mouse cursor in item coordinates at the moment the context menu was requested.

PySide.QtGui.QGraphicsSceneContextMenuEvent.reason()
Return type:PySide.QtGui.QGraphicsSceneContextMenuEvent.Reason

Returns the reason for the context menu event.

See also

QGraphicsSceneContextMenuEvent.Reason

PySide.QtGui.QGraphicsSceneContextMenuEvent.scenePos()
Return type:PySide.QtCore.QPointF

Returns the position of the mouse cursor in scene coordinates at the moment the the context menu was requested.

PySide.QtGui.QGraphicsSceneContextMenuEvent.screenPos()
Return type:PySide.QtCore.QPoint

Returns the position of the mouse cursor in screen coordinates at the moment the the context menu was requested.

PySide.QtGui.QGraphicsSceneContextMenuEvent.setModifiers(modifiers)
Parameters:modifiersPySide.QtCore.Qt.KeyboardModifiers
PySide.QtGui.QGraphicsSceneContextMenuEvent.setPos(pos)
Parameters:posPySide.QtCore.QPointF

Sets the position associated with the context menu to the given point in item coordinates.

PySide.QtGui.QGraphicsSceneContextMenuEvent.setReason(reason)
Parameters:reasonPySide.QtGui.QGraphicsSceneContextMenuEvent.Reason

Sets the reason for the context menu event to reason .

PySide.QtGui.QGraphicsSceneContextMenuEvent.setScenePos(pos)
Parameters:posPySide.QtCore.QPointF

Sets the position associated with the context menu to the given point in scene coordinates.

PySide.QtGui.QGraphicsSceneContextMenuEvent.setScreenPos(pos)
Parameters:posPySide.QtCore.QPoint

Sets the position associated with the context menu to the given point in screen coordinates.