Re: Need Qt SerialPort class example using signals and slots WITHIN A THREAD
Originally Posted by wysota
You can see two slots are called -- one in Object (with thread id 576) and the other one in Thread (with thread id 192). That's the correct behaviour as described in Qt docs (PyQt can't possibly work differently because it's just a wrapper over Qt C++ classes). I don't know why you're getting no output for Object, the most obvious reason is that the worker thread is not started (or its event loop is not running).
That is why I subclassed it. The thread starts. You can modify the run or start methods and determine that if you want. I don't know why either.
Bookmarks