QGraphicsSceneMoveEvent Class
Die Klasse QGraphicsSceneMoveEvent stellt Ereignisse für das Bewegen von Widgets im Graphics View Framework bereit. Mehr...
Kopfzeile: | #include <QGraphicsSceneMoveEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
Vererbt: | QGraphicsSceneEvent |
Öffentliche Funktionen
QGraphicsSceneMoveEvent() | |
virtual | ~QGraphicsSceneMoveEvent() |
QPointF | newPos() const |
QPointF | oldPos() const |
Detaillierte Beschreibung
Ein QGraphicsWidget sendet sich selbst ein QGraphicsSceneMoveEvent, sobald sich seine lokale Position ändert. Der Versand ist als Teil von QGraphicsItem::itemChange() implementiert.
Es ist ähnlich wie QMoveEvent, aber seine Positionen, oldPos() und newPos(), verwenden QPointF anstelle von QPoint.
Siehe auch QGraphicsItem::setPos(), QGraphicsItem::ItemPositionChange, und QGraphicsItem::ItemPositionHasChanged.
Dokumentation der Mitgliedsfunktionen
QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent()
Konstruiert ein QGraphicsSceneMoveEvent.
[virtual noexcept]
QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent()
Zerstört die QGraphicsSceneMoveEvent.
QPointF QGraphicsSceneMoveEvent::newPos() const
Gibt die neue Position (d. h. die aktuelle Position) zurück.
Siehe auch oldPos() und QGraphicsItem::setPos().
QPointF QGraphicsSceneMoveEvent::oldPos() const
Gibt die alte Position zurück (d. h. die Position unmittelbar bevor das Widget verschoben wurde).
Siehe auch newPos() und QGraphicsItem::setPos().
© 2025 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.