Details
-
Suggestion
-
Resolution: Out of scope
-
P4: Low
-
None
-
4.7.0
-
None
Description
Hi,
I think it would be nice to have a property in QML "Image" elements, or maybe in "MouseRegion", that tells the QML not to accept mouse events over pixels that have an alpha under some threshold.
Or maybe did I miss a simple way to do that?
Maybe something like an interface on the pixmap property of images would do (see example below)? Or maybe is it already possible but I missed that?
Image { id: quarter_moon_shaped_button source:"QuarterMoonShapedButton.png" MouseRegion { id: mouseRegion2; anchors.fill: parent; onPressed: { if(quarter_moon_shaped_button.pixmap.alpha(mouse.x,mouse.y)<0.4) mouse.accepted=false; } } }
B)
Image { id: quarter_moon_shaped_button source:"QuarterMoonShapedButton.png" MouseRegion { id: mouseRegion2; anchors.fill: parent; onPressed: { if(quarter_moon_shaped_button.alpha(mouse.x,mouse.y)<0.4) mouse.accepted=false; } } }