Throughout this book, I have pretty much stuck to teaching you the Qt Way of doing things. Does that mean it is right for all cases? Well, that depends.
If you are finding it hard to do something that should be simple in Qt, then (a) you aren't doing it the right (Qt) way or (b) you really shouldn't be doing it at all.
We saw this in the last chapter when we learned about Qt Concurrent. I learned about threading in Qt before Qt Concurrent was developed. As I learned about Qt Concurrent, I discovered that it was easier to do certain tasks using Qt Concurrent rather than QThreads. Still, I tend to resort to QThread and QThreadPool out of habit.
Should I use the pthread library or QThread?
It's a valid question that I have seen more than once, so let's look at it and see whether we can get some guidance that we can...