I have an application which have heavy processes within it. It has a function function1()
function1() contains these “heavy processes” and QEventLoop to make things synchronous and at the same time GUI will still be responsive
While function1() is still processing, user is so eager to close the application and hit the “Close window button on the top right (Windows)” to terminate the app….. then window closed
…. but after a second or two the window shows again. If function1() is not processing then window closes normally.
The question is how can I make my app wait for the function1() to end before closing? Data is so important that everything inside function1() should be terminated normally so that it won’t corrupt. I tried to reimplement QCloseEvent with “event->accept()” but don’t think it is right.
Any help? Thanks!
↧