内容表

上一话题

QGraphicsSceneMouseEvent

下一话题

QGraphicsSceneResizeEvent

QGraphicsSceneMoveEvent

QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework. 更多

Inheritance diagram of PySide2.QtWidgets.QGraphicsSceneMoveEvent

概要

函数

详细描述

A QGraphicsWidget sends itself a QGraphicsSceneMoveEvent immediately when its local position changes. The delivery is implemented as part of itemChange() .

It’s similar to QMoveEvent , but its positions, oldPos() and newPos() ,使用 QPointF 而不是 QPoint .

另请参阅

setPos() ItemPositionChange ItemPositionHasChanged

class QGraphicsSceneMoveEvent

构造 QGraphicsSceneMoveEvent .

PySide2.QtWidgets.QGraphicsSceneMoveEvent. newPos ( )
返回类型

QPointF

Returns the new position (i.e., the current position).

PySide2.QtWidgets.QGraphicsSceneMoveEvent. oldPos ( )
返回类型

QPointF

Returns the old position (i.e., the position immediately before the widget was moved).

PySide2.QtWidgets.QGraphicsSceneMoveEvent. setNewPos ( pos )
参数

pos QPointF

另请参阅

newPos()

PySide2.QtWidgets.QGraphicsSceneMoveEvent. setOldPos ( pos )
参数

pos QPointF

另请参阅

oldPos()