Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.7, 6.2.1
-
None
-
3e95a57dc1fb39b059b52e16fcce7b4262f88b61 (qt/qtdeclarative/dev) cdc5f8ff81c1d146ea063e31577c06e7327cca27 (qt/qtdeclarative/6.2) 33e24224555efa58736e9724aba19d0fc873b7c1 (qt/tqtc-qtdeclarative/5.15)
Description
The following QML code crashes in QQuickPointerHandler::setCursorShape / QQuickItemPrivate::setHasCursorInChild :
import QtQuick 2.15 import QtQuick.Window 2.15 Window { HoverHandler { cursorShape: Qt.ArrowCursor } }
I guess it's because the HoverHandler is not yet reparented to the Window contentItem and tries to use the Window as a QQuickItem.
Setting cursorShape in a more "complex" expression doesn't crash, the evaluation of the binding must be delayed after the reparenting. This means you can use this as a workaround:
cursorShape: (Qt.ArrowCursor)