Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.4.2, 6.5.0 Beta1
-
Windows 10 Pro 22H2, MSVC 2019 x64
-
f70844868 (dev), 5d2f4c348 (6.5), 8f9fdde22 (tqtc/lts-6.2), d4ef47ea9 (6.4), 4e81f58f8 (6.4.3)
Description
Clicking on the rectangular Canvas below causes a crash.
Interestingly, it doesn't seem to crash if the MouseArea is made a child of the Canvas.
import QtQuick import Qt5Compat.GraphicalEffects Window { id: root width: 400 height: 300 visible: true Canvas { id: btn width: 100 height: 50 anchors.centerIn: parent onPaint: getContext("2d").fillRect(0, 0, btn.width, btn.height) } // Moving this MouseArea into the Canvas causes the problem to disappear MouseArea { id: mouseArea anchors.fill: btn } DropShadow { anchors.fill: btn source: btn radius: mouseArea.pressed ? 0 : 3 transparentBorder: true verticalOffset: 3 horizontalOffset: 3 } }
Workaround
It doesn't crash if you replace the 0 with a small, non-zero value (e.g. Number.EPSILON )
Attachments
Issue Links
- relates to
-
QTBUG-108683 [Reg 5.15.2/6.3.2 -> 6.4.x] DropShadow: Changing radius at runtime also changes Z-order
- Closed