[Qt-qml] Transparent background

Anton Alferov casper.zx at gmail.com
Thu Aug 26 20:14:21 CEST 2010


Thanks for answers.

Alexis, translucent background flag works perfectly with the plain QWidget
on Windows XP. But not with the QDeclarativeView (and, btw, not with the
QPushButton).
Ok, I'll try to check it out for the autofillBackground property.

Anton.


On 26 August 2010 21:51, <alexis.menard at nokia.com> wrote:

> Hello,
>
> Translucent background flag works only if you have a window manager that
> supports it. On Windows I think it works only from Vista if i recall
> correctly.
>
> If it still doesn't work then you want to check the code of
> qdeclarativeview to see if the background color, the autofillBackground
> property are enforced.
>
> Thanks.
>
> On 26. aug. 2010, at 19.43, ext Anton Alferov wrote:
>
> I suppose that desktop (or other windows) still will not be visible under
> my window prepared with that code.
> I think I need to write something like:
>
> QDeclarativeView v;
> v.setAttribute(Qt::WA_TranslucentBackground);
>
> but that doesn't work.
>
> Thanks,
> Anton.
>
>
> On 26 August 2010 21:17, <alan.westbrook at nokia.com> wrote:
>
>> Use the color property to set the background 10%, and then opacity to set
>> the image translucency value:
>>
>>     Rectangle {
>>
>>         color: "#1a000000"
>>
>>          Image {
>>
>>             opacity: 0.5
>>
>>         }
>>
>>     }
>>
>>
>> Alan
>>
>> On Aug 26, 2010, at 2:19 AM, ext Anton Alferov wrote:
>>
>> Hello,
>>
>> Is there any way to make background of the QDeclarativeView
>> semi-transparent?
>> For example I'd like to put few images on it and they should have 50%
>> opacity, whereas the rest part of the window only 10%.
>>
>> Thanks,
>> Anton.
>> <ATT00001..txt>
>>
>>
>>
> <ATT00001..txt>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100826/43fd22b3/attachment.html 


More information about the Qt-qml mailing list