MouseDragEvent#

class pyqtgraph.GraphicsScene.mouseEvents.MouseDragEvent(moveEvent, pressEvent, lastEvent, start=False, finish=False)[source]#

Instances of this class are delivered to items in a GraphicsScene via their mouseDragEvent() method when the item is being mouse-dragged.

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 button that initiated the drag (may be different from the buttons currently pressed) (see QGraphicsSceneMouseEvent::button in the Qt documentation)

buttonDownPos(btn=None)[source]#

Return the position of the mouse at the time the drag was initiated in the coordinate system of the item that the event was delivered to.

buttonDownScenePos(btn=None)[source]#

Return the scene position of the mouse at the time btn was pressed. If btn is omitted, then the button that initiated the drag is assumed.

buttonDownScreenPos(btn=None)[source]#

Return the screen position (pixels relative to widget) of the mouse at the time btn was pressed. If btn is omitted, then the button that initiated the drag is assumed.

buttons()[source]#

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

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.

isFinish()[source]#

Returns False if this is the last event in a drag. Note that this event will have the same position as the previous one.

isStart()[source]#

Returns True if this event is the first since a drag was initiated.

lastPos()[source]#

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

lastScenePos()[source]#

Return the scene position of the mouse immediately prior to this event.

lastScreenPos()[source]#

Return the screen position of the mouse immediately prior to this event.

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.