Sur cette page

QHelpEvent Class

La classe QHelpEvent fournit un événement permettant de demander des informations utiles sur un point précis d'un widget. En savoir plus...

En-tête : #include <QHelpEvent>
CMake : find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake : QT += gui
Hérite de : QEvent

Fonctions publiques

QHelpEvent(QEvent::Type type, const QPoint &pos, const QPoint &globalPos)
const QPoint &globalPos() const
int globalX() const
int globalY() const
const QPoint &pos() const
int x() const
int y() const

Fonctions protégées

QHelpEvent(QHelpEvent &&)
QHelpEvent &operator=(QHelpEvent &&)
QHelpEvent &operator=(const QHelpEvent &other)

Description détaillée

Cet événement peut être intercepté dans les applications afin de fournir des info-bulles ou une aide de type « Qu'est-ce que c'est ? » pour les widgets personnalisés. La méthode type() peut prendre l'une des valeurs suivantes : QEvent::ToolTip ou QEvent::WhatsThis.

Voir également QToolTip, QWhatsThis, QStatusTipEvent et QWhatsThisClickedEvent.

Documentation sur les fonctions membres

QHelpEvent::QHelpEvent(QEvent::Type type, const QPoint &pos, const QPoint &globalPos)

Crée un événement d'aide avec l'type fournie, correspondant à la position relative au widget spécifiée par pos et à la position globale spécifiée par globalPos.

type Doit être soit QEvent::ToolTip, soit QEvent::WhatsThis.

Voir également pos() et globalPos().

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

Crée par « move » une instance de ` QHelpEvent`. Cette fonction est supprimée.

const QPoint &QHelpEvent::globalPos() const

Renvoie la position du curseur de la souris au moment où l'événement a été généré, en coordonnées globales.

Voir également pos(), globalX() et globalY().

int QHelpEvent::globalX() const

Identique à globalPos().x().

Voir également x(), globalY() et globalPos().

int QHelpEvent::globalY() const

Identique à globalPos().y().

Voir également y(), globalX() et globalPos().

const QPoint &QHelpEvent::pos() const

Renvoie la position du curseur de la souris au moment où l'événement a été généré, par rapport au widget auquel l'événement est transmis.

Voir également globalPos(), x() et y().

int QHelpEvent::x() const

Identique à pos().x().

Voir également y(), pos() et globalPos().

int QHelpEvent::y() const

Identique à pos().y().

Voir également x(), pos() et globalPos().

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

Cette opération affecte « other » à cette instance « QHelpEvent ». Cette fonction est supprimée.

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

Attribue par copie l'other à cette instance QHelpEvent.

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