Chapter 9.  Keeping Your Sanity with Multithreading

In previous chapters, we managed to always 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 the picture, and pan around to discover the magic of fractals.

The chapter covers the following topics:

  • Deep understanding of the QThread framework
  • Overview of all the available threading technologies in Qt
  • Using a QThreadPool class to dispatch jobs and aggregate the results
  • How to synchronize ...

Get Mastering Qt 5 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.