How to add a transparent QLabel on top of a video?
I would like to add a transparent QLabel on top of a video displaying a text. I have tried with the code below but it doesn't work.
myLabel->setWindowFlags(Qt::Window | Qt::FramelessWindowHint); myLabel->setAttribute(Qt::WA_TranslucentBackground);
I have also tried with setStyleSheet to set transparent background. The label does show on top of the video but the background is not transparent (grey border is visible).
Are there any ways that I get around with this? Thank you.
So after digging around, I found that I should use QGraphicsView along with QGraphicsScene and QGraphicsVideoItem instead of QVideoWidget to display the video.