Enable transparency for widget over widget rendered externally
-
Following the example given in another thread I've ended up with this short code:
WId winid = ui->widget->winId(); QString program; program = "C:\\Downloads\\mplayer-svn-38008\\mplayer.exe"; QStringList arguments; arguments << "-wid" << QString::number(winid) << "F:\\test.wmv"; QProcess *m_process = new QProcess(this); m_process->start(program, arguments);
It renders the output of mplayer into my "widget". The problem is I need to put over this one other widgets with alpha channel. Doing this in the usual way (i.e. settings a stylesheet with a rgba background color) doesn't work - I'm afraid because the external program draw in the WinId on top of Qt does with its own widgets. The result is any widget is "hidden".
Is there a way to enable such a transparency?
-
Hi,
Since you are rendering a Windows media video, why not use Qt Multimedia ?
Or if you need a multimedia Swiss army knife, you can take a look at the VLC-Qt project.
-
@Mark81 said in Enable transparency for widget over widget rendered externally:
-wid
Docs says ". This option fills the given window completely"
so it seems doubtful it would respect any transparent settings.I wonder how it reacts to setWindowOpacity()
-
Following this configuration example it seems to be possible also with VLC.
-
@Mark81 said in Enable transparency for widget over widget rendered externally:
-wid
Docs says ". This option fills the given window completely"
so it seems doubtful it would respect any transparent settings.I wonder how it reacts to setWindowOpacity()
@mrjj said in Enable transparency for widget over widget rendered externally:
Docs says ". This option fills the given window completely"
so it seems doubtful it would respect any transparent settings.Well, for me is ok if it fills the given window completely. The problem is related to the Qt Widgets that are not drawn above it.
I mean, I'm not interested into the transparency of the video, instead I need the Widgets on top of it respect transparency settings. -
Following this configuration example it seems to be possible also with VLC.
@SGaist said in Enable transparency for widget over widget rendered externally:
Following this configuration example it seems to be possible also with VLC.
I've tried with VLC but its latency is much higher than mplayer.