I have a common scenario: a dialog show the progress of copying lots of files and has a cancel button. The copy process is taking place in a QThread class which fires signals as files are copied and exit's the run() method when finished. the dialog gets the finished signal and closes itself.
Question: What is the best way for the dialog to shutdown the thread if the cancel button is clicked? In the old days I would simply have the dialog set a property on the thread class that the thread class would check after copying each file. If it was set, exit. Is there a better way to do this in Qt? I ask because there are other ways of doing it in .Net.
Sam
Bookmarks