qt5 - Punch a hole thro QT Graphics -


i have qt application video running , qt graphics on top of it. need punch hole graphics layer in rectangle become transparent , video becomes visible.

i checked setmask, api, hole rectangle becomes white. snippet -

qregion r1(0, 0, 1280, 800, qregion::rectangle); qregion r2(0, 150, 600, 480, qregion::rectangle); qregion visiblereg =  r1.subtracted (r2); setmask(visiblereg); 

any appreciated. using qt5.