Auf dieser Seite

QHelpEvent Class

Die Klasse „QHelpEvent“ stellt ein Ereignis bereit, mit dem hilfreiche Informationen zu einem bestimmten Punkt in einem Widget angefordert werden können. Mehr...

Header: #include <QHelpEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Erbt von: 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

Geschützte Funktionen

QHelpEvent(QHelpEvent &&)
QHelpEvent &operator=(QHelpEvent &&)
QHelpEvent &operator=(const QHelpEvent &other)

Ausführliche Beschreibung

Dieses Ereignis kann in Anwendungen abgefangen werden, um Tooltips oder „Was ist das?“-Hilfe für benutzerdefinierte Widgets bereitzustellen. Die Funktion ` type()` kann entweder ` QEvent::ToolTip ` oder ` QEvent::WhatsThis` sein.

Siehe auch „ QToolTip“ , „ QWhatsThis “, „ QStatusTipEvent “ und „ QWhatsThisClickedEvent “.

Dokumentation zu den Member-Funktionen

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

Erstellt ein Hilfe-Ereignis mit der angegebenen ` type `, die der durch ` pos ` festgelegten widget-relativen Position und der durch ` globalPos` festgelegten globalen Position entspricht.

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

Siehe auch pos() und globalPos().

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

Erstellt eine Instanz von ` QHelpEvent`. Diese Funktion ist gelöscht.

const QPoint &QHelpEvent::globalPos() const

Gibt die Position des Mauszeigers zum Zeitpunkt der Ereignisauslösung in globalen Koordinaten zurück.

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

int QHelpEvent::globalX() const

Wie unter globalPos().x().

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

int QHelpEvent::globalY() const

Wie unter globalPos().y().

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

const QPoint &QHelpEvent::pos() const

Gibt die Position des Mauszeigers zum Zeitpunkt der Ereignisauslösung zurück, relativ zu dem Widget, an das das Ereignis gesendet wurde.

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

int QHelpEvent::x() const

Entspricht pos().x().

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

int QHelpEvent::y() const

Entspricht pos().y().

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

[protected delete] QHelpEvent &QHelpEvent::operator=(QHelpEvent &&)

Weist „ other “ dieser „ QHelpEvent “-Instanz zu. Diese Funktion wird gelöscht.

[noexcept protected default] QHelpEvent &QHelpEvent::operator=(const QHelpEvent &other)

other Weist dieser „ QHelpEvent “-Instanz den Wert „ “ zu. zu dieser „ “-Instanz.

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