QGraphicsSceneMoveEvent Class Reference

[ QtGui module]

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

继承 QGraphicsSceneEvent .

方法


详细描述

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

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

It's similar to QMoveEvent ,但 its positions, oldPos () 和 newPos (), use QPointF 而不是 QPoint .


方法文档编制

QGraphicsSceneMoveEvent.__init__ ( self )

构造 QGraphicsSceneMoveEvent .

QPointF QGraphicsSceneMoveEvent.newPos ( self )

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

另请参阅 oldPos () 和 QGraphicsItem.setPos ().

QPointF QGraphicsSceneMoveEvent.oldPos ( self )

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

另请参阅 newPos () 和 QGraphicsItem.setPos ().