QHelpEvent Class

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

头文件: #include <QHelpEvent>
qmake: QT += gui
基类: QEvent

公有函数

QHelpEvent(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
  • 6 个公有函数继承自 QEvent

其他继承的成员

  • 1 个属性继承自 QEvent
  • 1 个静态公有成员继承自 QEvent
  • 2 个受保护的变量继承自 QEvent

详细描述

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

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.

参见 QToolTip, QWhatsThis, QStatusTipEvent, and QWhatsThisClickedEvent.

成员函数

QHelpEvent::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.

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

参见 pos() and globalPos().

const QPoint &QHelpEvent::globalPos() const

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

参见 pos(), globalX(), and globalY().

int QHelpEvent::globalX() const

Same as globalPos().x().

参见 x(), globalY(), and globalPos().

int QHelpEvent::globalY() const

Same as globalPos().y().

参见 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.

参见 globalPos(), x(), and y().

int QHelpEvent::x() const

Same as pos().x().

参见 y(), pos(), and globalPos().

int QHelpEvent::y() const

Same as pos().y().

参见 x(), pos(), and globalPos().