Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.4
-
None
-
OS Windows 11 Pro
Processor 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz 2.80 GHz
Installed RAM 32,0 GB (31,7 GB usable)
System type 64-bit operating system, x64-based processor
Description
The cursorShape property of the HoverHandler element is not applied by the tapped signal of the TapHandler element located at the same level
I create a new Qt Quick Application project in Qt Creator (version 7.0.2). Here is the content of the main.qml file:
import QtQuick 2.15 import QtQuick.Window 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle { id: rb color: "green" width: parent.width / 2 height: parent.height / 2 anchors.centerIn: parent TapHandler { property bool isHandCursor: true onTapped: { hh.cursorShape = isHandCursor ? Qt.OpenHandCursor : Qt.ArrowCursor isHandCursor = !isHandCursor } } HoverHandler { id: hh cursorShape: Qt.ArrowCursor } } }
Those. here, by the tap gesture, the Rectangle element is set in turn, either the mouse pointer in the form of an arrow, or in the form of a hand. However, immediately after the tap gesture, the mouse pointer does not change its shape when displayed. But if the mouse pointer is moved outside the Rectangle element and then returned back (without clicks or tap gestures), then the new shape will already be displayed as the mouse pointer. All of this can be seen in the attached video.