[Qt-qml] Image Transparency

Thomas Perl th.perl at gmail.com
Sun Feb 6 12:11:27 CET 2011


Hi Vinayakam,

2011/2/6 Vinayakam Murugan <mvinayakam at gmail.com>:
> It worked with FocusScope. Though I would love to understand why it didn't
> work.

As Jason said, it's probably because a Rectangle has a background
color, even if none is set (the default is white according to the
docs). You could try with "Rectangle { color: "transparent" }", but
just using Item in that case is probably easier (and faster?).
Replacing "Rectangle" with "Item" should do the trick. As FocusScope
inherits from Item, you also get the desired effect with FocusScope.

HTH.
Thomas


More information about the Qt-qml mailing list