PySide6.QtWidgets.QGraphicsSceneMoveEvent¶
- class QGraphicsSceneMoveEvent¶
QGraphicsSceneMoveEvent类提供了在图形视图框架中移动小部件的事件。更多…概要¶
方法¶
def
__init__()def
newPos()def
oldPos()def
setNewPos()def
setOldPos()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
当
QGraphicsWidget的本地位置发生变化时,它会立即向自己发送一个QGraphicsSceneMoveEvent。该传递是作为itemChange()的一部分实现的。它类似于QMoveEvent,但其位置,
oldPos()和newPos(),使用QPointF而不是QPoint。- __init__()¶
返回新位置(即当前位置)。
返回旧的位置(即小部件移动前的位置)。