Waiting is sometimes unavoidable. Whether querying the network, accessing a filesystem, or running a complex computation, sometimes a program just needs time to complete a process. While we're waiting, though, there's no reason for our GUI to become completely unresponsive. Modern systems with multiple CPU cores and threading technology allow us to run concurrent processes, and there's no reason why we can't take advantage of this to make responsive GUIs. Although Python has its own threading library, Qt offers us the QThread object, which can be used to build multithreaded applications easily. It has the additional advantage of being integrated into Qt and being compatible with signals and slots.
In this section, we'll build a somewhat slow file searching tool and then use QThread to ensure that the GUI remains responsive.
...