[Interest] Creating a transparent "hole" in QML Scene Graph

André Somers andre at familiesomers.nl
Thu Dec 24 09:49:13 CET 2015



Op 23/12/2015 om 20:32 schreef Konstantin Tokarev:
> Hi all,
>
> I'm running QML on embedded device (IPTV set-top box) which has separate hardware layer fo video output, placed under UI layer where QML paints.
>
> Now I'd like create QML item providing transparent "hole", i.e. transparent rect hich would not blend with content underneath, but "erasing" it (so that video layer becomes unobscured).
>
> In widgets API I could draw transparent rect with QPainter using CompositionMode_Clear. Is it possible to achieve the same thing in QML? Solution (ab)using private APIs is acceptable for me.
>
Couldn't you just not have items in your scenegraph in that rect?

Otherwise a solution using a shader to just delete the fragments 
(pixels) in the area of interest comes to mind, but I have no experience 
writing those. ShaderEffect may be of help there.

André




More information about the Interest mailing list