Play a video with custom overlay graphics

后端 未结 2 1047
无人及你
无人及你 2020-12-20 06:34

I want to play a video (with sound) in a simple GUI with \"play\" and \"stop\" buttons etc. There are classes and widgets in Qt\'s Phonon module for doing that, and several

2条回答
  •  醉酒成梦
    2020-12-20 06:45

    Use QGraphicsView and QGraphicsWidgets. You can put your Phonon::VideoWidget inside a QGraphicsProxyWidget and it becomes usable as a QGraphicsWidget.

    For custom overlays, inherit QGraphicsWidget and override the paint function to draw your custom widgets. You can add them to your scene and they will appear on top of your video widget.

提交回复
热议问题