QGraphicsSceneMoveEvent Class
A classe QGraphicsSceneMoveEvent fornece eventos relacionados ao deslocamento de widgets na estrutura de visualização gráfica. Mais...
| Cabeçalho: | #include <QGraphicsSceneMoveEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
| Herdado de: | QGraphicsSceneEvent |
Funções públicas
| QGraphicsSceneMoveEvent() | |
| virtual | ~QGraphicsSceneMoveEvent() |
| QPointF | newPos() const |
| QPointF | oldPos() const |
Descrição detalhada
Um ` QGraphicsWidget ` envia a si mesmo um `QGraphicsSceneMoveEvent` imediatamente quando sua posição local é alterada. O envio é implementado como parte de ` QGraphicsItem::itemChange()`.
É semelhante a ` QMoveEvent`, mas suas posições, ` oldPos()` e ` newPos()`, utilizam ` QPointF ` em vez de ` QPoint`.
Veja também QGraphicsItem::setPos(), QGraphicsItem::ItemPositionChange e QGraphicsItem::ItemPositionHasChanged.
Documentação das funções-membro
QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent()
Cria um objeto QGraphicsSceneMoveEvent.
[virtual noexcept] QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent()
Destrói o “ QGraphicsSceneMoveEvent ”.
QPointF QGraphicsSceneMoveEvent::newPos() const
Retorna a nova posição (ou seja, a posição atual).
Veja também oldPos() e QGraphicsItem::setPos().
QPointF QGraphicsSceneMoveEvent::oldPos() const
Retorna a posição anterior (ou seja, a posição imediatamente antes de o widget ter sido movido).
Veja também newPos() e 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.