In previous chapters, we managed to write code without ever relying on threads. It is time to face the beast and truly understand how threading works in Qt. In this chapter, you will develop a multithreaded application that displays a Mandelbrot fractal. It is a heavy computational process that will bring tears to your CPU cores.
In the example project, the user can see the Mandelbrot fractal, zoom in on the picture, and pan around to discover the magic of fractals.
This chapter will cover the following topics:
- Discovering QThread
- Flying over Qt multithreading technologies
- Architecting the Mandelbrot project
- Defining a Job class with QRunnable
- Using QThreadPool in MandelbrotCalculator
- Displaying the fractal with MandelbrotWidget