View Full Version : Transparent image over video

4th February 2013, 15:57
In my project I have video to display and at time I will need to overlay video with some image that has transparent background. I have tried setting transparent image as QPixmap into QLabel, but here is what I get, the transparency is visible when the label/image is over the main widget, but when the image is over the video, the transparency is over black background and no over the video. This I tried with QT 4.8.x

Now when I got QT5, I decided to try it out. To convert my project to qt5, might take some time, so for testing purpose, i use "Player" example http://qt-project.org/doc/qt-5.0/qtmultimedia/multimediawidgets-player.html
Then I added the following code:

iconLabel = new QLabel(this);
QPixmap p("controlNext.png");
p = p.scaled(192,192);
cb = new ControlButton(QIcon("controlNext.png"),
I have tried displaying transparent background image via QLabel and a QPushButton. ControlButton, is my custom button that I use in my project. Attached is what I get. The image is transparent over the application, but with black background over the video.

Is there a way to set it up so that there will be no black background when widgets/images is over the video?
I have searched this site, but seems without any luck. I have tried "Videos get pimped Published November 28, 2008 | By tbastian" at http://blog.qt.digia.com/blog/2008/11/ , but then no video is shown at all.

Any help would be appreciated

18th September 2015, 20:22
I realize this is a shot in the dark given that this is a 2.5 year old thread...but.

Did you ever resolve this issue? I'm having the exact same problems. Transparency worked great for me in qt4.6, but it's totally broken with qt5.3