Auf dieser Seite

QGraphicsSceneMoveEvent Class

Die Klasse „QGraphicsSceneMoveEvent“ stellt Ereignisse für das Verschieben von Widgets im Grafikansichts-Framework bereit. Mehr...

Header: #include <QGraphicsSceneMoveEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
Erbt von: QGraphicsSceneEvent

Öffentliche Funktionen

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

Ausführliche Beschreibung

Ein „ QGraphicsWidget “ sendet sich selbst sofort ein „QGraphicsSceneMoveEvent“, sobald sich seine lokale Position ändert. Die Übertragung wird als Teil von „ QGraphicsItem::itemChange()“ implementiert.

Sie ähnelt „ QMoveEvent “, verwendet jedoch bei ihren Positionen „ oldPos()“ und „ newPos()“ „ QPointF “ anstelle von „ QPoint “.

Siehe auch QGraphicsItem::setPos(), QGraphicsItem::ItemPositionChange und QGraphicsItem::ItemPositionHasChanged.

Dokumentation zu Mitgliedsfunktionen

QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent()

Erstellt ein `QGraphicsSceneMoveEvent`.

[virtual noexcept] QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent()

Zerstört die „ QGraphicsSceneMoveEvent “.

QPointF QGraphicsSceneMoveEvent::newPos() const

Gibt die neue Position zurück (d. h. die aktuelle Position).

Siehe auch oldPos() und QGraphicsItem::setPos().

QPointF QGraphicsSceneMoveEvent::oldPos() const

Gibt die ursprüngliche Position zurück (d. h. die Position unmittelbar vor dem Verschieben des Widgets).

Siehe auch newPos() und 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.