In QML, how can I prevent a child element from inheriting the opacity from its parent? I want to set different opacity values for the parent and it\'s child element.
I've bumped into this issue just now. Using Qt 5.1.0
In my case, I had a Rectangle Element with opacity: 0.6 and a child Image element. The Image was inheriting the transparency - not desired.
To solve it, I enclosed the main Rectangle in an Item element. Passed the size/position definitions from the Rectangle to the outer Item. Moved the Image outside the Rectangle.
In the end, I had Item as the main parent and Rectangle and Image side by side, inside Item.
Only Rectangle maintained the opacity 0.6, so the Rectangle has transparency and Image is fully opaque.