QMoveEvent Class

Die Klasse QMoveEvent enthält Ereignisparameter für Bewegungsereignisse. Mehr...

Kopfzeile: #include <QMoveEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Vererbungen: QEvent

Öffentliche Funktionen

QMoveEvent(const QPoint &pos, const QPoint &oldPos)
const QPoint &oldPos() const
const QPoint &pos() const

Detaillierte Beschreibung

Verschiebungsereignisse werden an Widgets gesendet, die an eine neue Position relativ zu ihrem Elternteil verschoben wurden.

Der Eventhandler QWidget::moveEvent() empfängt Verschiebungsereignisse.

Siehe auch QWidget::move() und QWidget::setGeometry().

Dokumentation der Mitgliedsfunktionen

QMoveEvent::QMoveEvent(const QPoint &pos, const QPoint &oldPos)

Konstruiert ein Verschiebungsereignis mit der neuen und der alten Position des Widgets, pos bzw. oldPos.

const QPoint &QMoveEvent::oldPos() const

Gibt die alte Position des Widgets zurück.

const QPoint &QMoveEvent::pos() const

Gibt die neue Position des Widgets zurück. Dies schließt den Fensterrahmen für Widgets der obersten Ebene aus.

© 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.