The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework. 更多...
| 頭: | #include <QGraphicsSceneMoveEvent> |
| qmake: | QT += widgets |
| Since: | Qt 4.4 |
| 繼承: | QGraphicsSceneEvent |
| QGraphicsSceneMoveEvent () | |
| virtual | ~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 .
[虛擬]
QGraphicsSceneMoveEvent::
~QGraphicsSceneMoveEvent
()
返迴新位置 (即:當前位置)。
另請參閱 oldPos () 和 QGraphicsItem::setPos ().
返迴舊位置 (即:Widget 被移動之前的即時位置)。
另請參閱 newPos () 和 QGraphicsItem::setPos ().