Auf dieser Seite

QMoveEvent Class

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

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

Öffentliche Funktionen

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

Geschützte Funktionen

QMoveEvent(QMoveEvent &&)
QMoveEvent &operator=(QMoveEvent &&)
QMoveEvent &operator=(const QMoveEvent &other)

Ausführliche Beschreibung

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

Der Ereignishandler QWidget::moveEvent() empfängt Move-Ereignisse.

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

Dokumentation der Mitgliedsfunktionen

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

Erstellt ein Verschiebungsereignis mit der neuen und der alten Widget-Position, nämlich „ pos “ bzw. „ oldPos “.

[protected delete] QMoveEvent::QMoveEvent(QMoveEvent &&)

Erstellt eine Instanz von ` QMoveEvent`. Diese Funktion wurde gelöscht.

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. Bei Widgets auf oberster Ebene wird dabei der Fensterrahmen nicht berücksichtigt.

[protected delete] QMoveEvent &QMoveEvent::operator=(QMoveEvent &&)

Weist „ other “ dieser „ QMoveEvent “-Instanz zu. Diese Funktion wird gelöscht.

[noexcept protected default] QMoveEvent &QMoveEvent::operator=(const QMoveEvent &other)

Weist dieser „ QMoveEvent “-Instanz „ other “ zu.

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