MouseClickEvent — pyqtgraph 0.11.0rc0 documentation

# MouseClickEvent

class `pyqtgraph.GraphicsScene.mouseEvents.` `MouseClickEvent`(pressEvent, double=False)

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

  `accept`()

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

  `button`()

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

  `buttons`()

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

  `double`()

    Return True if this is a double-click.

  `ignore`()

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

  `lastPos`()

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

  `modifiers`()

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

  `pos`()

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

  `scenePos`()

    Return the current scene position of the mouse.

  `screenPos`()

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