I am trying to to write a program to display a video using phonon within a qgraphicsscene.<br>The attached code will play the audio but not the video part.<br>This is confusing me as all examples I have seen ( and there are not may) show this as the way to do it.<br>
<br><span style="font-family: courier new,monospace;">def main(args):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> app=QtGui.QApplication(args)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> app.setApplicationName(u'd1')</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> app.setQuitOnLastWindowClosed(True)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> scene = QtGui.QGraphicsScene()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> view = QtGui.QGraphicsView(scene)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> view.setViewport(QtOpenGL.QGLWidget())</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> view.resize(400, 300)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> view.show()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> mediaObject = Phonon.MediaObject()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> videoWidget = Phonon.VideoWidget()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> audioOutput = Phonon.AudioOutput(Phonon.VideoCategory)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Phonon.createPath(mediaObject, videoWidget)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Phonon.createPath(mediaObject, audioOutput)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> audioOutput.setMuted(True)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> scene.addWidget(videoWidget)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> mediaObject.setCurrentSource(Phonon.MediaSource('<filegoeshere>'))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> #yaProxy.resize(videoWidget.size())</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> mediaObject.play()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> scene.addLine(50, 50, 700, 700, QtGui.QPen())</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> return app.exec_()</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">if __name__=="__main__":</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> main(sys.argv)</span> <br clear="all">
<br>-- <br>Tim and Alison Bentley<br>Home@TRARBentley.net<br>