Hello

I would like to place widgets with transparent backgrounds on top of Phonon VideoPlayer in my application.
I think the perfect solution for me is to use QGraphicsScene and embed a VideoPlayer widget into it. Unfortunately doing so doesn't show any video. The window is whole white, I can only hear the sound of the playback.

Here is my code:
Qt Code:
  1. #include <QtGui>
  2. #include <Phonon/VideoPlayer>
  3.  
  4. int main(int argc, char **argv)
  5. {
  6. QApplication app(argc, argv);
  7.  
  8. Phonon::VideoPlayer player;
  9. player.play(QString("//home/kamil/snowball.mp4"));
  10. player.setMinimumSize(300, 200);
  11.  
  12. scene->addWidget(&player);
  13.  
  14. QGraphicsView view(scene);
  15. player.show();
  16. view.show();
  17. view.setWindowTitle(QLatin1String("Graphicsview embedded phonon"));
  18. view.setGeometry(50, 50, 600, 400);
  19.  
  20. return app.exec();
  21. }
To copy to clipboard, switch view to plain text mode 
Adding "view.setViewport(new QGLWidget);" to the code doesn't make any difference. When I comment line 13 //scene->addWidget(&player); VideoPlayer shows as separate window and everything works just fine, there is audio and video. Media Player example, from qtdemo, works fine as well. Judging by that, I think the problem may be some system settings/xorg settings/graphics driver or even video card.

My video card is Mobilny Radeon HD 5165, but seen by the system as "Mobility Radeon HD 4650". I've tried diffrent software configurations: Gnome with free drivers, Kubuntu 2.6.32-25 with free/ati drivers, Qt 4.6.2/4.7.0 - none works. On ati drivers (OpenGL v. 3.2.9756) I've even managed to run all OpenGL examples from qtdemo. I also tried to run my code on Intel GM965/GL960, Linux-2.6.36, xorg-server-1.9.1, xf86-video-intel-2.13.0, mesa-7.8.2, qt-4.6.3, no result. The only configuration that worked fine was Kubuntu on VirtualBox on NVidia, but the performance was poor, and colors of video playback were some kind of broken.

Are you aware of any specyfic requirements, that system must meet in order to render video via QGraphicsScene properly? Can you tell what might be the problem in my case? I can provide any additional info about my configuration if this can help tracing the problem.

And finally, can you enumerate some Linux configurations (excluding virtual machines), that you tested, or that are known to work fine with phonon embedded into QGraphicsScene?

Best regards,
Kamil