![]() |
Qt 6.x
The Qt SDK
|
\qmltype HoverHandler \instantiates QQuickHoverHandler \inherits SinglePointHandler \inqmlmodule QtQuick More...
\qmltype HoverHandler \instantiates QQuickHoverHandler \inherits SinglePointHandler \inqmlmodule QtQuick
Handler for mouse and tablet hover.
HoverHandler detects a hovering mouse or tablet stylus cursor.
A binding to the \l hovered property is the easiest way to react when the cursor enters or leaves the \l {PointerHandler::parent}{parent} Item. The \l {SinglePointHandler::point}{point} property provides more detail, including the cursor position. The \l {PointerDeviceHandler::acceptedDevices}{acceptedDevices}, \l {PointerDeviceHandler::acceptedPointerTypes}{acceptedPointerTypes}, and \l {PointerDeviceHandler::acceptedModifiers}{acceptedModifiers} properties can be used to narrow the behavior to detect hovering of specific kinds of devices or while holding a modifier key.
The \l cursorShape property allows changing the cursor whenever \l hovered changes to true
.
Definition at line 39 of file qquickhoverhandler.cpp.
|
overridevirtual |
Reimplemented from QQuickPointerHandlerPrivate.
Definition at line 50 of file qquickhoverhandler.cpp.
References QQuickPointerHandlerPrivate::onEnabledChanged(), parent, and updateHasHoverInChild().
|
overridevirtual |
Reimplemented from QQuickPointerHandlerPrivate.
Definition at line 62 of file qquickhoverhandler.cpp.
References QQuickPointerHandlerPrivate::onParentChanged(), and updateHasHoverInChild().
void QQuickHoverHandlerPrivate::updateHasHoverInChild | ( | QQuickItem * | item, |
bool | hasHover | ||
) |
Definition at line 72 of file qquickhoverhandler.cpp.
References QQuickItemPrivate::Content, QQuickItemPrivate::dirty(), QQuickItemPrivate::get(), item, and QQuickItemPrivate::setHasHoverInChild().
Referenced by onEnabledChanged(), and onParentChanged().