I have a QT Application with Video running and QT Graphics is on top of it. I need to punch a hole so that all graphics layer in a rectangle become transparent and Video becomes visible.
I checked setMask, but with this API, the hole rectangle becomes white. This is the 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 help would be appreciated. I am using QT5.
↧