
I like using a QObject worker and I think this is the best (and easiest)Īpproach. Subclass QThread and reimplement the run function. The two other approaches are defined by Qt’s QThreadĭocumentation. Use a non-Qt solution when Qt already provides portable threading. You can use an already built portable thread library but why I don’t like this approach because you’re basically writing a portable The first is using system threads, either pthread or Windows There are three main ways I’ve seen people handle basic threading in their QtĪpplications. Still basic / direct / low level threading (I’ll just call thisīasic) is often seen as difficult with Qt.

Threads can be difficult and Qt provides a lot of ways to make threads easy to Over the years using Qt I’ve seen a lot of difficulty using threads with Qt. Effective Threading Using Qt Introduction
