En esta página

QGraphicsSceneMoveEvent Class

La clase `QGraphicsSceneMoveEvent` proporciona eventos relacionados con el desplazamiento de widgets en el marco de trabajo de la vista gráfica. Más información...

Encabezado: #include <QGraphicsSceneMoveEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
Heredado de: QGraphicsSceneEvent

Funciones públicas

QGraphicsSceneMoveEvent()
virtual ~QGraphicsSceneMoveEvent()
QPointF newPos() const
QPointF oldPos() const

Descripción detallada

Un ` QGraphicsWidget ` se envía a sí mismo un `QGraphicsSceneMoveEvent` inmediatamente cuando cambia su posición local. El envío se implementa como parte de ` QGraphicsItem::itemChange()`.

Es similar a ` QMoveEvent`, pero sus métodos ` oldPos()` y ` newPos()` utilizan ` QPointF ` en lugar de ` QPoint`.

Véase también QGraphicsItem::setPos(), QGraphicsItem::ItemPositionChange y QGraphicsItem::ItemPositionHasChanged.

Documentación de las funciones de miembro

QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent()

Crea un objeto `QGraphicsSceneMoveEvent`.

[virtual noexcept] QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent()

Destruye el « QGraphicsSceneMoveEvent ».

QPointF QGraphicsSceneMoveEvent::newPos() const

Devuelve la nueva posición (es decir, la posición actual).

Véase también oldPos() y QGraphicsItem::setPos().

QPointF QGraphicsSceneMoveEvent::oldPos() const

Devuelve la posición anterior (es decir, la posición inmediatamente anterior al desplazamiento del widget).

Véase también newPos() y QGraphicsItem::setPos().

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.