QEnterEvent Class

The QEnterEvent class contains parameters that describe an enter event. More...

Header: #include <QEnterEvent>
CMake: find_package(Qt6 COMPONENTS Gui REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Since: Qt 5.0
Inherits: QSinglePointEvent

Public Functions

QEnterEvent(const QPointF &localPos, const QPointF &scenePos, const QPointF &globalPos, const QPointingDevice *device = QPointingDevice::primaryPointingDevice())
QPoint globalPos() const
int globalX() const
int globalY() const
QPointF localPos() const
QPoint pos() const
QPointF screenPos() const
QPointF windowPos() const
int x() const
int y() const

Detailed Description

Enter events occur when the mouse cursor enters a window or a widget.

Member Function Documentation

QEnterEvent::QEnterEvent(const QPointF &localPos, const QPointF &scenePos, const QPointF &globalPos, const QPointingDevice *device = QPointingDevice::primaryPointingDevice())

Constructs an enter event object originating from device.

The points localPos, scenePos and globalPos specify the mouse cursor's position relative to the receiving widget or item, window, and screen or desktop, respectively.

QPoint QEnterEvent::globalPos() const

Returns the global position of the mouse cursor at the time of the event.

int QEnterEvent::globalX() const

Returns the global position on the X-axis of the mouse cursor at the time of the event.

int QEnterEvent::globalY() const

Returns the global position on the Y-axis of the mouse cursor at the time of the event.

QPointF QEnterEvent::localPos() const

Returns the mouse cursor's position relative to the receiving widget.

QPoint QEnterEvent::pos() const

Returns the position of the mouse cursor relative to the receiving widget.

QPointF QEnterEvent::screenPos() const

Returns the position of the mouse cursor relative to the receiving screen.

QPointF QEnterEvent::windowPos() const

Returns the position of the mouse cursor relative to the receiving window.

int QEnterEvent::x() const

Returns the x position of the mouse cursor relative to the receiving widget.

int QEnterEvent::y() const

Returns the y position of the mouse cursor relative to the receiving widget.

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