QGraphicsSceneMoveEvent Class
La classe QGraphicsSceneMoveEvent fornisce eventi relativi allo spostamento dei widget nel framework della vista grafica. Per saperne di più...
| Intestazione: | #include <QGraphicsSceneMoveEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
| Eredita da: | QGraphicsSceneEvent |
Funzioni pubbliche
| QGraphicsSceneMoveEvent() | |
| virtual | ~QGraphicsSceneMoveEvent() |
| QPointF | newPos() const |
| QPointF | oldPos() const |
Descrizione dettagliata
Un oggetto ` QGraphicsWidget ` invia immediatamente a se stesso un evento `QGraphicsSceneMoveEvent` quando la sua posizione locale cambia. L'invio è implementato come parte della funzione ` QGraphicsItem::itemChange()`.
È simile a ` QMoveEvent`, ma le sue posizioni, ` oldPos()` e ` newPos()`, utilizzano ` QPointF ` invece di ` QPoint`.
Vedi anche QGraphicsItem::setPos(), QGraphicsItem::ItemPositionChange e QGraphicsItem::ItemPositionHasChanged.
Documentazione sulle funzioni membro
QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent()
Crea un oggetto QGraphicsSceneMoveEvent.
[virtual noexcept] QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent()
Distrugge l’ QGraphicsSceneMoveEvent.
QPointF QGraphicsSceneMoveEvent::newPos() const
Restituisce la nuova posizione (ovvero la posizione corrente).
Vedi anche oldPos() e QGraphicsItem::setPos().
QPointF QGraphicsSceneMoveEvent::oldPos() const
Restituisce la posizione precedente (ovvero la posizione immediatamente prima che il widget venisse spostato).
Vedi anche 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.