O'Reilly logo

Game Programming Using Qt by Lorenz Haas, Witold Wysota

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

Chapter 6. Graphics View

Widgets are great for designing graphical user interfaces. However, you will run into problems if you wish to animate multiple widgets at the same time by constantly moving them around in the application. For these situations, or in general for frequently transforming 2D graphics, Qt offers you Graphics View. In this chapter, you will learn the basics of the Graphics View architecture and its items. You also will learn how to combine widgets with Graphics View items. Once you have acquired a basic understanding, we are next going to develop a simple jump-and-run game illustrating how to animate the items. Finally, we'll look into some possibilities for optimizing Graphics View's performance.

Graphics View architecture

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