Answer the question
In order to leave comments, you need to log in
Qt AutoFillBackGround and translucent window?
Let's start with the fact that I use mplayer to play videos in my application. A process is created, the winId of the widget on which the video is played is indicated. In order for the picture to show, I set AutoFillBackground to true. All this works as it should. I use mplayer because Phonon didn't want to play *.avs files with any backend (even mplayer). And mplayer plays by itself.
Now I needed to make a window in the form of a picture with translucency. It works like this:
MainWindow mw;
QPixmap img(":/win.png");
mw.setPixmap(img);
mw.setMask(img.mask());
mw.resize(1280, 1050);
mw.setAttribute(Qt::WA_TranslucentBackground);
mw.setWindowFlags(Qt::FramelessWindowHint);
Answer the question
In order to leave comments, you need to log in
I solved the problem by making a separate window for the player (top-level widget). I had to track the movement of the main window and move the player behind it, but everything works fine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question