[Qt-interest] Invalid background rendering

Tr3wory tr3w at freemail.hu
Mon Apr 12 17:46:15 CEST 2010


On Mon, Apr 12, 2010 at 5:05 PM, K. Frank <kfrank29.c at gmail.com> wrote:
> Okay, I tried out your new test.  (Same build process and versions as before.)
Thanks.

> When I comment out the line
>
>   proxy->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
>
> I suppose that the program works "properly."  (Again, I don't know enough to
> know what to expect.)
>
> Specifically, upon startup, that background of the widget is black, and the
> background of the two buttons is a darkish green.  When I mouse over the
> buttons the text ("Button 1" and "Button 2") changes from white to yellow
> (and reverts back to white when the mouse moves off the button).
>
> It seems that no matter what I do (mouse-over, click, resize, etc.), the colors
> stay the same (except for the text changing to yellow), that is, the background
> of the widget remains black, and the background of the buttons remains green.
That's what I expect.

> In the unmodified version, in which the setCacheMode line is active, I see
> behavior similar to that of your first example:
>
> Upon startup the widget background is black, and the button background
> is darkish green.  When I move the mouse over a button, that button's text
> turns yellow, and that button's background  becomes a slightly lighter green.
> When I move the mouse back off the button, the text reverts to white, and the
> button's background becomes lighter still.  There is a border of a few pixels
> on the sides of the buttons, on the bottom of the lower button, and between
> the buttons, but not on the top of the upper button, that remains dark green,
> even as the background of the buttons is becoming lighter.
>
> As I repeatedly mouse over the buttons, the backgrounds becoming progressively
> lighter -- I see perhaps rather more than half a dozen shades of
> green.  It seems
> that the background lightens as the mouse enters the button, and then lightens
> again as the mouse leaves.
>
> Various things cause the button background to revert back to its original dark
> green -- sometimes switching focus to another window and back, sometimes
> resizing the window, and sometimes just mousing over the button repeatedly.
> I haven't found anything that consistently resets the background color
> -- it seems
> like passage of time might be part of it.
I think it is a bug. Mainly because in 4.5.x it's worked as I expected... :)

I created a new issue in the bug tracking system.

Thanks for the help.

tr3w




More information about the Qt-interest-old mailing list