The real answer (to the original thread question), as most of the time is: "it depends".
On many things and considerations.
So a real "right way of doing it" is not something absolute.
Usually however, if you design your code well and in OOP way, what ever it is you want your worker thread to do should be encapsulated in a way which is not dependent (but capable) of running in a thread.
This usually will translate to NOT needing to subclass a QThread.
This issue got to be somewhat of a religious issue over the past years.
Different people just feel that one way is more right than the other.
The test is in the real word: which implementation fits your design the best way on all fronts:
readability, re-usability, maintenance (such the the open-close principal) etc.
Here is a interesting post by an (ex?) troll, where he answers another blog post (be sure to read it, its linked in the blog text!).
Once you have read it, make the best decision for your case.
And don't let anyone else tell you if its wrong or right, unless they can prove their claim with valid points to your specific case.
http://woboq.com/blog/qthread-you-we...-so-wrong.html
Bookmarks