Effects in QML

In this chapter, we will look at the tools for various effects in QML. The focus will be on:

  • Particle Effects
  • Shader Effects

Particle Effects

Particle effects lets us create groups of particles, i.e. instances of a given element. These are generated in a stochastic way and let us work with groups of items rather than individual items. This can be used to create things such as falling leafs, explosions, fire, clouds, and starfields.

Shader Effects

Shader effects are applied in the graphics rendering pipeline and allows us to change both the size and colour of any visible QML element. This can be used to create transitions such as the genie effect, waves and curtains, or filters such as blur, grayscale, and blending.

Shaders are written in a shader language which is then baked and imported into the QML scene, much as other resources. These shaders can then be applied to images or other elements to create advanced visual effects.

TIP

Working with shader effects is an advanced topic.