May 2019
Intermediate to advanced
542 pages
13h 37m
English
In order to talk effectively about threading, we first require a slow process that can be run on a separate thread. Open a new copy of the Qt application template and call it file_searcher.py.
Let's begin by implementing a file searching engine:
class SlowSearcher(qtc.QObject): match_found = qtc.pyqtSignal(str) directory_changed = qtc.pyqtSignal(str) finished = qtc.pyqtSignal() def __init__(self): super().__init__() self.term = None
We're calling this SlowSearcher because it's going to be deliberately non-optimized. It starts with defining a few signals, as follows:
Read now
Unlock full access