Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.14
-
None
Description
The following example can be used to demonstrate:
import QtQuick 2.14 Item { width: 400 height: 400 Rectangle { width: 200 height: 200 color: "red" scale: 0 // any scale other than 0 works as expected TapHandler { onTapped: console.log("tapped") } } }
With any scale value other than 0, "tapped" is only output when clicking within the visual red Rectangle. With a scale value of 0, "tapped" is output as though the item were of scale 1.
This appears to be due to the interaction of https://code.woboq.org/qt5/qtdeclarative/src/quick/items/qquickwindow.cpp.html#2456 and contains(). (with a scale of 0, mapFromScene returns the original value, which contains() happily accepts.)