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
Your solution cannot work because you cannot add a QGLWidget
to QGraphicsProxyWidget
. Please look at
http://doc.qt.digia.com/qt/qgraphicsproxywidget.html
Note that widgets with the
Qt::WA_PaintOnScreen
widget attribute set and widgets that wrap an external application or controller cannot be embedded. Examples areQGLWidget
andQAxWidget
.
Please correct me if I'm wrong.
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.