Chapter 8: Graphics and Animations

In this chapter, you will learn the fundamentals of Qt's graphics framework and how to render graphics on a screen. You will understand how general drawing is done in Qt. We will begin by discussing 2D graphics using QPainter. We will explore how to draw different shapes using a painter. Then you will learn about the Graphics View architecture used by QGraphicsView and QGraphicsScene. Later, we will discuss the Scene Graph mechanism used by Qt Quick. In this chapter, you will also learn how to make the user interface more interesting by adding animations and states.

In this chapter, we will discuss the following:

  • Understanding Qt's graphics framework
  • QPainter and 2D graphics
  • The Graphics View framework
  • OpenGL ...

Get Cross-Platform Development with Qt 6 and Modern C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.