Translucent window background in 4.3.2 - possible?
Hi!
I have a top-level window which is painted using QPixmap with varying alpha-channel. With Qt 4.5.x I use setAttribute( Qt::WA_TranslucentBackground) to make these regions semi-transparent depending on alpha value.
Now I have the need to achieve the same effect with Qt 4.3.2 (please don't ask me why 4.3.2, I have my reasons ;) ).
I can't find a way to do this, perhaps someone can give me an advice? Is it possible at all?
QLabel::setMask() won't do, because it only respects alpha 0 and alpha 1, not a values in between.
Re: Translucent window background in 4.3.2 - possible?
Do you only want part of the windows transparent? If so, then I think you'll have to go into Qt source code and make the changes yourself.
If you want the whole app to have some sort of transparency, you can use QWidget::setWindowOpacity(qreal level);
Re: Translucent window background in 4.3.2 - possible?
The first case: I want to draw a custom shadow with ranging alpha value on the sides of my window, while other parts staying opaque.
Ok, thanks, perhaps I'll try to search on how QA_TranslucentBackground is implemented in 4.5.x...