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 implementation
- Qt Quick scene graph
- Animation in QML
- State machines in Qt
By the end of this chapter, you will understand the graphics framework used by Qt. You will be able to draw onscreen...