The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework. 更多...
| 头: | #include <QGraphicsSceneMoveEvent> |
| qmake: | QT += widgets |
| Since: | Qt 4.4 |
| 继承: | QGraphicsSceneEvent |
| QGraphicsSceneMoveEvent () | |
| ~QGraphicsSceneMoveEvent () | |
| QPointF | newPos () const |
| QPointF | oldPos () const |
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 ().
它类似于 QMoveEvent ,但其位置 oldPos () 和 newPos (),使用 QPointF 而不是 QPoint .
另请参阅 QGraphicsItem::setPos (), QGraphicsItem::ItemPositionChange ,和 QGraphicsItem::ItemPositionHasChanged .
返回新位置 (即:当前位置)。
另请参阅 oldPos () 和 QGraphicsItem::setPos ().
返回旧位置 (即:Widget 被移动之前的即时位置)。
另请参阅 newPos () 和 QGraphicsItem::setPos ().