[Qt-interest] Invalid background rendering

Tr3wory tr3w at freemail.hu
Mon Apr 12 10:31:48 CEST 2010


Thank you for the help.

As it turned out I made a mistake: I omitted the
Qt::WA_TranslucentBackground attribute.
With this attribute, the example is working properly.

But my original program did not, because it's a little different, it
use QGraphicsView and item caching.

I created an another example. Can you test it?

And please check it with, and without the
"proxy->setCacheMode(QGraphicsItem::DeviceCoordinateCache);" line.

Thanks for the help.

tr3w

On Mon, Apr 12, 2010 at 12:29 AM, K. Frank <kfrank29.c at gmail.com> wrote:
> Hello -
>
> I believe I see the behavior you are describing.  (I don't know enough about
> how the transparent stuff is supposed to work to have an opinion as to
> whether it's a bug.)
>
> Specifically, after I start the program I see two white text fields on a darkish
> green background ("Button 1" and "Button 2").  If I change focus away from
> the WidgetBug app, the green background becomes slightly lighter and more
> pastel.  If I hover the mouse over either of the buttons, the color of just that
> button becomes still a little lighter, and the text turns yellow.  Moving the
> mouse off of that button causes that button's green color to lighten still a
> little more, and the text turns back to white.  (I can repeat this process with
> the other button.)  Resizing the app to a larger size causes the background,
> including the area around the buttons, to revert back to the original dark green
> color it had when the app first started.
>
> I wouldn't say I see a border to the buttons -- I just a button
> background, if you
> will, that is a lighter shade of green than the app background.
>
> I unzipped your WidgetBug.zip file, ran qmake, and then mingw32-make.  I built
> this with 32-bit mingw on 64-bit windows 7.  My versions are reported
> as follows:
>
>   C:\...>qmake --version
>   QMake version 2.01a
>   Using Qt version 4.6.1 in C:/...
>
>   C:\...>mingw32-make --version
>   GNU Make 3.81
>   ...
>   This program built for i386-pc-mingw32
>
>   C:\...>g++ --version
>   g++ (TDM-2 mingw32) 4.4.1
>
>
> I could try other things, if that would be helpful.
>
> Good luck.
>
>
> K. Frank
>
>
> On Sun, Apr 11, 2010 at 1:42 PM, Tr3wory <tr3w at freemail.hu> wrote:
>> Hi!
>>
>> I have a widget with transparent background.
>> In the recent versions of Qt (namely 4.6.1 and 4.6.2) I found a very
>> strange behavior:
>> after some update it will be opaque.
>>
>> I created a minimal example with 2 buttons. The buttons don't have
>> border and background, but after one hover event it will have.
>>
>> Can somebody confirm this?
>>
>> tr3w
>>
>> P.S.: I use Mingw 4.4 on Windows XP.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WidgetBug2.zip
Type: application/zip
Size: 1303 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100412/8101818e/attachment.zip 


More information about the Qt-interest-old mailing list