QGraphicsSceneMoveEvent 类

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 ()

构造 QGraphicsSceneMoveEvent .

[virtual] QGraphicsSceneMoveEvent:: ~QGraphicsSceneMoveEvent ()

销毁 QGraphicsSceneMoveEvent .

QPointF QGraphicsSceneMoveEvent:: newPos () const

返回新位置 (即:当前位置)。

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

QPointF QGraphicsSceneMoveEvent:: oldPos () const

返回旧位置 (即:Widget 被移动之前的即时位置)。

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