O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Have a go hero – The blur parallax scrolled game view

The blur property is a very nice effect that can be used in many situations. For example, you can try to implement a feature within our elephant game whereby when the user pauses the game (for example, by pressing the P key on the keyboard), the view gets blurred. Make the effect smooth by applying an animation to the effect's radius property.

Another interesting effect is Glow. It renders a colored and blurred copy of the source element. An example use case for games is highlighting some parts of the user interface—you can direct the user's attention to the element (for example, button or badge) by making the element flash periodically:

Window {    //...    Badge {        id: importantBadge anchors.centerIn: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required