I'm making a video player using PySide which is a python bind to the Qt framework. I'm using phonon(a module) to display the video and I want to display text above the video as a subtitle. How can I put another widget above my phonon widget. Is opengl an option?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- QML: Cannot read property 'xxx' of undefin
- How to get the background from multiple images by
- Evil ctypes hack in python
If you just create your label and set the phonon widget as the parent, the label should appear over it.
(I realize this is C++ and you are working in Python but it should be similar)
Update: The above will not work for hardware accelerated video playback. An alternative that does work is to create a graphics scene and add the video widget or player to the scene and use a
QGraphicsTextItem
for the text. Setting the viewport to aQGLWidget
will enable hardware acceleration: