QT Creator - creating a QGraphicsVideoItem
-
Hello all,
I'm using Qt Creator 4.11.0 Based on Qt 5.12.8 (GCC 9.3.0, 64 bit).
I have a stacked widget that on one 'page' plays a video. I'd like to overlay text onto the video. I had tried using a QVideoWidget but was unable to obtain a transparent background on the text field. It seems that a QGraphicsVideoItem is the way to go.
I've tried promoting a QWidget in Qt Creator to such a widget but without success. Could anyone please point me in the right direction?
Thanks,
-
@Pl45m4 said in QT Creator - creating a QGraphicsVideoItem:
QGraphicsVideoItem
Thanks for the reply.
I was looking at the documentation & it doesn't seem to require a QGraphicsScene. I could be wrong however..
-
Hi,
The snippet of code you have in the documentation you linked does not create one explicitly however it makes use of one that was set on the QGraphicsView object that is shown there.
-
Not directly.
As for the overlay part, see this stack overflow answer. It's in Python but easily translatable to C++.