Skip to content

HoverHandler: allow cursorShape binding before parentItem is set

When a HoverHandler is declared in a Window, the handler's bindings are evaluated before QQuickItemPrivate::data_append() is called to add the handler to the window's content item. So we need null pointer checks again (as we have for a lot of calls to parentItem() already). And to ensure that the declared cursorShape actually is shown, we need to check again in componentComplete(). And don't forget to call the parent class implementation whenever overriding any virtual function.

Fixes: QTBUG-98717 Pick-to: 6.2 5.15 Change-Id: Id0defac7a238df522e8eee69f71e83a3947560af Reviewed-by: Fabian Kosmale fabian.kosmale@qt.io (cherry picked from commit 3e95a57d)


Apparently patch for Qt6 has merge conflicts with 5.15 branch. I haven't investigated yet. Feel free to pick it up.

Merge request reports