[Interest] QtQuick - ColorAnimation issue with colors that have alpha

Preet prismatic.project at gmail.com
Sat Nov 23 01:59:50 CET 2013


Hi,

I use ColorAnimation to animate a color transition on a rectangle
between two states (say ColorA to ColorB). The default color of the
rectangle is A, and it changes to B when a child MouseArea is pressed.

In the case where ColorA is completely transparent (#00abcdef) and
ColorB is completely opaque, the animation from ColorA->ColorB seems
to work fine. The alpha along with RGB components is faded from A to
B. However, when going back from B to A, it seems like the transition
goes something like ColorB->ColorA(no alpha)->Black->ColorA

This doesn't happen if ColorB has any alpha in it. There's a quick
work around by making ColorB nearly opaque (ie. "#FEabcdef")

Here's a simple example:
http://pastebin.kde.org/pixaqd47y

I'm on Qt 5.2, somewhere around beta from git. Is this a bug?


Preet



More information about the Interest mailing list