One simple solution is to introduce a member variable, for example, bool m_isProcessing
, start processing only if m_isProcess == false
, then set it to true
when you start processing and reset it to false
when processing is complete. Since the slots for your test QObject
execute on the GUI/main thread, you don't need to worry about synchronization between timer slots and the slot that will execute when processing is finished.
If you want to keep track of events that occur during processing, you can use the same method: introduce a member variable to the test
class to track the information you need.