My doWork() is processing some number of items. It should process this data unless user presses Pause button or Stop button. I initially made a QThread subclass which in run() had while(true) (i guess that this is not a bad practice in thread?) and some exit conditions checking flags set by signals from GUI. As "this->moveToThread(this)" trick is not a good thing to do i have rebuild my QThread subclass to QObject subclass.
How would you rebuild the while(true){} processing loop to fit "QObject moved to QThread" approach?
Best regards.
Bookmarks