MouseClickEvent

class pyqtgraph.GraphicsScene.mouseEvents.MouseClickEvent(pressEvent, double=False)[source]

Instances of this class are delivered to items in a GraphicsScene via their mouseClickEvent() method when the item is clicked.

accept()[source]

An item should call this method if it can handle the event. This will prevent the event being delivered to any other items.

button()[source]

Return the mouse button that generated the click event. (see QGraphicsSceneMouseEvent::button in the Qt documentation)

buttons()[source]

Return the buttons currently pressed on the mouse. (see QGraphicsSceneMouseEvent::buttons in the Qt documentation)

double()[source]

Return True if this is a double-click.

ignore()[source]

An item should call this method if it cannot handle the event. This will allow the event to be delivered to other items.

lastPos()[source]

Return the previous position of the mouse in the coordinate system of the item that the event was delivered to.

modifiers()[source]

Return any keyboard modifiers currently pressed. (see QGraphicsSceneMouseEvent::modifiers in the Qt documentation)

pos()[source]

Return the current position of the mouse in the coordinate system of the item that the event was delivered to.

scenePos()[source]

Return the current scene position of the mouse.

screenPos()[source]

Return the current screen position (pixels relative to widget) of the mouse.