QGraphicsSceneMoveEvent Class
La classe QGraphicsSceneMoveEvent fournit des événements pour le déplacement des widgets dans le cadre de la vue graphique. Plus d'informations...
| En-tête : | #include <QGraphicsSceneMoveEvent> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Widgets)target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake : | QT += widgets |
| Héritages : | QGraphicsSceneEvent |
Fonctions publiques
| QGraphicsSceneMoveEvent() | |
| virtual | ~QGraphicsSceneMoveEvent() |
| QPointF | newPos() const |
| QPointF | oldPos() const |
Description détaillée
Un site QGraphicsWidget s'envoie un QGraphicsSceneMoveEvent dès que sa position locale change. La livraison est mise en œuvre dans le cadre de QGraphicsItem::itemChange().
Elle est similaire à QMoveEvent, mais ses positions, oldPos() et newPos(), utilisent QPointF au lieu de QPoint.
Voir aussi QGraphicsItem::setPos(), QGraphicsItem::ItemPositionChange, et QGraphicsItem::ItemPositionHasChanged.
Documentation sur les fonctions membres
QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent()
Construit un événement QGraphicsSceneMoveEvent.
[virtual noexcept] QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent()
Détruit le site QGraphicsSceneMoveEvent.
QPointF QGraphicsSceneMoveEvent::newPos() const
Renvoie la nouvelle position (c'est-à-dire la position actuelle).
Voir aussi oldPos() et QGraphicsItem::setPos().
QPointF QGraphicsSceneMoveEvent::oldPos() const
Renvoie l'ancienne position (c'est-à-dire la position précédant immédiatement le déplacement du widget).
Voir aussi newPos() et 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.