How it works...

Each of the graphic effects is a class of its own that inherits the QGraphicsEffect parent class. You can create your own custom effect by creating a new class that inherits QGraphicsEffect and re-implementing some of the functions in it.
Each effect has its own set of variables that are specifically created for it. For example, you can set the color of the colorized effect, but there is no such variable in the blur effect. This is because each effect is vastly different from the others, which is also why it needs to be a class of its own rather than using the same class for all the different effects.

It's only possible to add a single graphics effect to a widget at a time. If you add more than one effect, only the last one will be applied to the widget, as it replaces the previous one. Other than that, be aware that if you create a graphics effect, say, the drop shadow effect, you can't assign it to two different widgets either, as it will only get assigned to the last widget you applied it to. If you need to apply the same type of effect to several different widgets, create a few graphics effects of the same type and apply each of them to their respective widgets.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset