![]() |
Qt 6.x
The Qt SDK
|
The QHelpEvent class provides an event that is used to request helpful information about a particular point in a widget. More...
#include <qevent.h>
Public Member Functions | |
QHelpEvent (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. | |
int | x () const |
Same as pos().x(). | |
int | y () const |
Same as pos().y(). | |
int | globalX () const |
Same as globalPos().x(). | |
int | globalY () const |
Same as globalPos().y(). | |
const QPoint & | pos () const |
Returns the mouse cursor position when the event was generated, relative to the widget to which the event is dispatched. | |
const QPoint & | globalPos () const |
Returns the mouse cursor position when the event was generated in global coordinates. | |
![]() | |
QEvent (Type type) | |
Constructs an event object of type type. | |
virtual | ~QEvent () |
Destroys the event. | |
Type | type () const |
Returns the event type. | |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false . | |
virtual void | setAccepted (bool accepted) |
bool | isAccepted () const |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). | |
bool | isInputEvent () const noexcept |
bool | isPointerEvent () const noexcept |
bool | isSinglePointEvent () const noexcept |
virtual QEvent * | clone () const |
Creates and returns an identical copy of this event. | |
The QHelpEvent class provides an event that is used to request helpful information about a particular point in a widget.
\inmodule QtGui
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.
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.
Definition at line 3299 of file qevent.cpp.
|
inline |
Returns the mouse cursor position when the event was generated in global coordinates.
Definition at line 798 of file qevent.h.
Referenced by QMenu::event(), QWidget::event(), QAbstractItemDelegate::helpEvent(), QWidgetTextControl::processEvent(), QHeaderView::viewportEvent(), and QGraphicsView::viewportEvent().
|
inline |
Same as globalPos().x().
|
inline |
Same as globalPos().y().
|
inline |
Returns the mouse cursor position when the event was generated, relative to the widget to which the event is dispatched.
Definition at line 797 of file qevent.h.
Referenced by QMenu::event(), QMenuBar::event(), QTabBar::event(), QMdi::ControllerWidget::event(), QWidgetTextControl::processEvent(), QHeaderView::viewportEvent(), QGraphicsView::viewportEvent(), and QAbstractItemView::viewportEvent().
|
inline |
|
inline |