QHelpEvent 类

QHelpEvent 类提供用于在 Widget 中有关特定点请求有帮助信息的事件。 更多...

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

公共函数

  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

详细描述

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 ,和 QWhatsThisClickedEvent .

成员函数文档编制

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 .

另请参阅 pos () 和 globalPos ().

const QPoint &QHelpEvent:: globalPos () const

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

另请参阅 pos (), globalX (),和 globalY ().

int QHelpEvent:: globalX () const

如同 globalPos (). x ().

另请参阅 x (), globalY (),和 globalPos ().

int QHelpEvent:: globalY () const

如同 globalPos (). y ().

另请参阅 y (), globalX (),和 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 (),和 y ().

int QHelpEvent:: x () const

如同 pos ().x().

另请参阅 y (), pos (),和 globalPos ().

int QHelpEvent:: y () const

如同 pos ().y().

另请参阅 x (), pos (),和 globalPos ().