Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Issue with WA_TranslucentBackground again
For many days now I have tried to have a window with a transparent background by using "WA_TranslucentBackground". But it did not work neither on Qt 4.8 or Qt 5.1.1 . When I use it the background stays black. Here is the code:
MainWindow::MainWindow(QWidget *parent) :
doesn't work too and gives the same result.
Please someone knows what is wrong or at least has an application working with "WA_TranslucentBackground" or "setStyleSheet("background: transparent;")" ?
NB: I am working on Windows Xp but both codes work well on Linux. In addition this problem seems recurrent and many bug reports and threads exist concerning "WA_TranslucentBackground" but without any solution. I am wondering if the Digia's staff is working on it.
peterchou last edited by
you are wrong, read the manual you will know, there need setWindowFlags(Qt::FramelessWindowHint) to be set.
Sorry Peterchou but as the function says itself, it allows just to remove the window's frame. So I can add it or not it wont change the problem... The question is: how do you get a window's background transparent with frame?