IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QEnterEvent Class

The QEnterEvent class contains parameters that describe an enter event.

This class was introduced in Qt 5.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QEnterEvent Class

  • Header: QEnterEvent

  • Since: Qt 5.0

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

  • Inherits: QSinglePointEvent

  • Group: QEnterEvent is part of events

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.

Obsolete Members for QEnterEvent

The following members of class QEnterEvent are deprecated. We strongly advise against using them in new code.

Obsolete Member Function Documentation

 
QPoint QEnterEvent::globalPos() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use globalPosition() instead.

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

int QEnterEvent::globalX() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use globalPosition().x() instead.

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

int QEnterEvent::globalY() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use globalPosition().y() instead.

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

QPointF QEnterEvent::localPos() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use position() instead.

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

QPoint QEnterEvent::pos() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use position().toPoint() instead.

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

QPointF QEnterEvent::screenPos() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use globalPosition() instead.

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

QPointF QEnterEvent::windowPos() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use scenePosition() instead.

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

int QEnterEvent::x() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use position().x() instead.

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

int QEnterEvent::y() const

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use position().y() instead.

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

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+