The PySide.QtGui.QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
When a PySide.QtGui.QGraphicsView receives a PySide.QtGui.QMouseEvent , it translates it to a PySide.QtGui.QGraphicsSceneMouseEvent . The event is then forwarded to the PySide.QtGui.QGraphicsScene associated with the view. If the event is not handled by the scene, the view may use it, e.g., for the QGraphicsView.DragMode .
In addition to containing the item, scene, and screen coordinates of the event (as PySide.QtGui.QGraphicsSceneMouseEvent.pos() , PySide.QtGui.QGraphicsSceneMouseEvent.scenePos() , and PySide.QtGui.QGraphicsSceneMouseEvent.screenPos() ), mouse events also contain the coordinates of the previous mouse event received by the view. These can be retrieved with PySide.QtGui.QGraphicsSceneMouseEvent.lastPos() , PySide.QtGui.QGraphicsSceneMouseEvent.lastScreenPos() , and PySide.QtGui.QGraphicsSceneMouseEvent.lastScenePos() .
| Parameters: | type – PySide.QtCore.QEvent.Type |
|---|
Constructs a generic graphics scene mouse event of the specified type .
| Return type: | PySide.QtCore.Qt.MouseButton |
|---|
Returns the mouse button (if any) that caused the event.
| Parameters: | button – PySide.QtCore.Qt.MouseButton |
|---|---|
| Return type: | PySide.QtCore.QPointF |
| Parameters: | button – PySide.QtCore.Qt.MouseButton |
|---|---|
| Return type: | PySide.QtCore.QPointF |
| Parameters: | button – PySide.QtCore.Qt.MouseButton |
|---|---|
| Return type: | PySide.QtCore.QPoint |
| Return type: | PySide.QtCore.Qt.MouseButtons |
|---|
Returns the combination of mouse buttons that were pressed at the time the event was sent.
| Return type: | PySide.QtCore.QPointF |
|---|
Returns the last recorded mouse cursor position in item coordinates.
| Return type: | PySide.QtCore.QPointF |
|---|
Returns the last recorded mouse cursor position in scene coordinates. The last recorded position is the position of the previous mouse event received by the view that created the event.
| Return type: | PySide.QtCore.QPoint |
|---|
Returns the last recorded mouse cursor position in screen coordinates. The last recorded position is the position of the previous mouse event received by the view that created the event.
| Return type: | PySide.QtCore.Qt.KeyboardModifiers |
|---|
Returns the keyboard modifiers in use at the time the event was sent.
| Return type: | PySide.QtCore.QPointF |
|---|
Returns the mouse cursor position in item coordinates.
| Return type: | PySide.QtCore.QPointF |
|---|
Returns the mouse cursor position in scene coordinates.
| Return type: | PySide.QtCore.QPoint |
|---|
Returns the mouse cursor position in screen coordinates.
| Parameters: | button – PySide.QtCore.Qt.MouseButton |
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: | buttons – PySide.QtCore.Qt.MouseButtons |
|---|
| Parameters: | pos – PySide.QtCore.QPointF |
|---|
| Parameters: | pos – PySide.QtCore.QPointF |
|---|
| Parameters: | pos – PySide.QtCore.QPoint |
|---|
| Parameters: | modifiers – PySide.QtCore.Qt.KeyboardModifiers |
|---|
| Parameters: | pos – PySide.QtCore.QPointF |
|---|
| Parameters: | pos – PySide.QtCore.QPointF |
|---|
| Parameters: | pos – PySide.QtCore.QPoint |
|---|