QGraphicsSceneMoveEventclass provides events for widget moving in the graphics view framework. 更多 …
A QGraphicsWidget sends itself a
QGraphicsSceneMoveEventimmediately when its local position changes. The delivery is implemented as part ofitemChange().It’s similar to
QMoveEvent, but its positions,oldPos()andnewPos(),使用QPointF而不是QPoint.另请参阅
setPos()ItemPositionChangeItemPositionHasChanged
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).