How do I use paintEvent on a QVideoWidget with transparency?
-
0
I'm working on qt5 (c ++). I use QVideoWidget to play rtsp video stream. I wanted to draw any signatures with QPainter on the displayed video. However, I obscure the video while drawing. For example, as for the drawing area, I have given half of the QVideoWidget image.
Tried adding an extra QLabel on QVideoWidget:
QLabel * label = new QLabel (ui-> videoWidget);
and then draw on the "label", but also cover the QVideoWidget.I also added:
ui-> videoWidget-> setAttribute (Qt :: WA_X11OpenGLOverlay);
But then the transparency extends all the way to the desktop of the operating system.