O'Reilly logo

Advanced Qt Programming: Creating Great Software with C++ and Qt 4 by Mark Summerfield

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8. Threading with QThread

This chapter covers the QThread class which provides fine control over threading, and support for Qt’s signals and slots mechanism. Like the previous chapter it assumes prior knowledge of threading in general and the basics of Qt threading in particular. The chapter also assumes that you have at least read the beginning of the previous chapter.

If we have a small number of items (or a small number of groups of items) to process in the background, and we want to keep track of progress and completion, then often the best solution is to create a QThread subclass. Qt’s QThread class (and also QRunnable) was modeled on Java’s Thread class and so has a similar overall ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required