How it works...

By default, there is a main thread (also known as a GUI thread) in any Qt 5 applications. Other threads that you create are called the worker threads.

GUI-related classes, such as QWidgets and QPixmap, can only exist in the main thread, so you must be extra careful when dealing with these classes.

QFuture is a high-level class that deals with asynchronous computation.

We use the QFutureWatcher class to let QFuture interact with signals and slots. You can even use this for displaying the progress of the operation on a progress bar.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset