QHelpEvent Class

The QHelpEvent class provides an event that is used to request helpful information about a particular point in a widget. More...

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

Public Functions

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

Reimplemented Public Functions

virtual QHelpEvent *clone() const override

Protected Functions

QHelpEvent(const QHelpEvent &)
QHelpEvent(QHelpEvent &&)

Detailed Description

This event can be intercepted in applications to provide tooltips or "What's This?" help for custom widgets. The type() can be either QEvent::ToolTip or QEvent::WhatsThis.

See also QToolTip, QWhatsThis, QStatusTipEvent, and QWhatsThisClickedEvent.

Member Function Documentation

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

Constructs a help event with the given type corresponding to the widget-relative position specified by pos and the global position specified by globalPos.

type must be either QEvent::ToolTip or QEvent::WhatsThis.

See also pos() and globalPos().

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

Copy constructor.

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

Move-copy constructor.

[override virtual] QHelpEvent::~QHelpEvent()

Destroys the instance of QHelpEvent. The destructor is virtual.

[override virtual] QHelpEvent *QHelpEvent::clone() const

const QPoint &QHelpEvent::globalPos() const

Returns the mouse cursor position when the event was generated in global coordinates.

See also pos(), globalX(), and globalY().

int QHelpEvent::globalX() const

Same as globalPos().x().

See also x(), globalY(), and globalPos().

int QHelpEvent::globalY() const

Same as globalPos().y().

See also y(), globalX(), and globalPos().

const QPoint &QHelpEvent::pos() const

Returns the mouse cursor position when the event was generated, relative to the widget to which the event is dispatched.

See also globalPos(), x(), and y().

int QHelpEvent::x() const

Same as pos().x().

See also y(), pos(), and globalPos().

int QHelpEvent::y() const

Same as pos().y().

See also x(), pos(), and globalPos().

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