-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 > Hi I have been reading about QtThread and there seems to be a lot > of discussion about how to correctly use this class. i.e. should > developers derive from QtThread or provide an QObject and move this > object to a thread. The examples provided with Qt5 derive from > QtThread whereas there is a lot of chatter on the web saying this > is not the correct way. > > Can anyone provide some definitive answers on how developers are to > use QtThread? > > Thanks _______________________________________________ Interest > mailing list Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > You must know that QThread is not the thread itself, but it's a class for manipulation of the thread. So, the QThread object stays in main thread.
Derive from QThread and moveToThread() are two correctly use-case of QThread. IMHO, deriving from QThread is more complicated, you must understand, how to create objects and run code in new thread, but not in QThread's parent thread. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlLTs1AACgkQZxvOZ+bTdZheVAD9GOwA8IsVjZZJXdCL/KR2u+lH 9rGA8qeZ1mY/zIqel1UA/3pB+SLGHzzA89oxF6jpcFcD0/HEAfaf2VoVVe7/n+vj =6OTm -----END PGP SIGNATURE----- _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest