[Qt-interest] Trying To Understand Transparent Background
Girish Ramakrishnan
girish at forwardbias.in
Sat Oct 3 08:21:41 CEST 2009
Cheung Yik Pang wrote:
> Hi all,
>
> I have a questions about using transparent color as background color of
> widgets.
>
> My little test program basically move a blue widget around in a
> transparent widget for every 5 seconds. Both widgets had
> autoFillBackground set to true.
>
> My expectation is that when the blue widget moved from area A to area B
> in the parent widget, area A will be cleared with transparent color and
> area B will be blue. But what I get is both area A and area B became blue.
>
> I have tried the new 4.5.3 and the 4.6 git head on Windows. Both have
> the same result.
What you are seeing is expected behavior. Maybe you can tell us what are
you trying to achieve? Are you trying to make your window transparent
i.e one can see through your window? If so, this is not the correct
approach - see WA_TranslucentWindow.
Girish
More information about the Qt-interest-old
mailing list