QHelpEvent Class

Die Klasse QHelpEvent stellt ein Ereignis zur Verfügung, das verwendet wird, um hilfreiche Informationen über einen bestimmten Punkt in einem Widget anzufordern. Mehr...

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

Öffentliche Funktionen

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

Detaillierte Beschreibung

Dieses Ereignis kann in Anwendungen abgefangen werden, um Tooltips oder "What's This?"-Hilfe für benutzerdefinierte Widgets bereitzustellen. Der type() kann entweder QEvent::ToolTip oder QEvent::WhatsThis sein.

Siehe auch QToolTip, QWhatsThis, QStatusTipEvent, und QWhatsThisClickedEvent.

Dokumentation der Mitgliedsfunktionen

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

Konstruiert ein Hilfe-Ereignis mit dem angegebenen type entsprechend der durch pos angegebenen widget-relativen Position und der durch globalPos angegebenen globalen Position.

type muss entweder QEvent::ToolTip oder QEvent::WhatsThis sein.

Siehe auch pos() und globalPos().

const QPoint &QHelpEvent::globalPos() const

Gibt die Position des Mauszeigers zum Zeitpunkt der Erzeugung des Ereignisses in globalen Koordinaten zurück.

Siehe auch pos(), globalX(), und globalY().

int QHelpEvent::globalX() const

Dasselbe wie globalPos().x().

Siehe auch x(), globalY(), und globalPos().

int QHelpEvent::globalY() const

Dasselbe wie globalPos().y().

Siehe auch y(), globalX(), und globalPos().

const QPoint &QHelpEvent::pos() const

Gibt die Position des Mauszeigers zurück, als das Ereignis erzeugt wurde, relativ zu dem Widget, an das das Ereignis gesendet wird.

Siehe auch globalPos(), x(), und y().

int QHelpEvent::x() const

Dasselbe wie pos().x().

Siehe auch y(), pos(), und globalPos().

int QHelpEvent::y() const

Dasselbe wie pos().y().

Siehe auch x(), pos(), und globalPos().

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