[Interest] How QtQuick for Qt 5.2+ handles opacity/visibility

Sletta Gunnar Gunnar.Sletta at digia.com
Tue Nov 12 21:25:44 CET 2013


There is a tiny difference, but nothing significant. The rectangle with a transparent color will not be added to the scenegraph and the one with opacity set to zero will be ignored. In either case they are not actually rendered ;)

-
Gunnar

> On 12. nov. 2013, at 19:37, "Preet" <prismatic.project at gmail.com> wrote:
> 
> Hi,
> 
> In the interest of performance, if I have a Rectangle that I don't
> want to be rendered when its completely transparent (but otherwise
> want it to act like an Item -- assume it doesn't have any children) is
> there any difference between the following?:
> 
> case 1:
> Rectangle { height: 50; width: 50; color: "#00ABCDEF"; }
> 
> case 2:
> Rectangle { height: 50; width: 50; color: "#FFFFFF"; opacity: 0; }
> 
> 
> Is case 1 rendered at all?
> 
> 
> Preet
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list