[Qt-interest] Is possible to use partial window opacity? (i.e. Leave certain areas Opaque)
Samuel Rødal
sroedal at trolltech.com
Tue Feb 17 12:12:53 CET 2009
techsgin wrote:
> Hi All
>
> Is possible to use partial window opacity? (i.e. Leave certain areas
Opaque)
>
> We are trying to make a semi-transparent window where we show an image
> which is opaque at the middle.
>
> * (Like the full screen mode in picasa).
>
> We are using “setWindowOpacity ( 0.5 )” but this applies to the entire
> window, and we cannot isolate the child widget that display the image.
>
> Any ideas?
>
> We had in mind may be to float an extra frameless child window on to of
> the semi-transparent one? But it sounds like the wrong way.
>
> Thanks
>
> TechSgin
Hello,
In Qt 4.5 we've added the Qt::WA_TranslucentBackground window attribute
to be able to have per-pixel opacity for top-level windows. Another
option which should also in earlier Qt versions could be to use
QWidget::setMask() in combination with setWindowOpacity().
Regards,
Samuel
More information about the Qt-interest-old
mailing list