BusyIndicator affecting the timeout value of QTimer
-
Background: In our embedded QT application(based on ARM processor), there is a Qtimer which will timeout for every 20ms. Updating the user interface objects is done inside the timeout handler of this timer.
Also, we have a computationally heavy task which I replaced with a "for" loop with some 3000 iterations and print statements inside it for easy understanding. I'm showing BusyIndicator during this operation.
Issue1: When the BusyIndicator is being shown, the Qtimer which is set for 20ms is getting timeout for every 40+ seconds.(Anyway this is not causing any issue at this point of time because, no UI related operations are done when BusyIndicator is displayed).
Issue2(Actual Issue): Once the heavy task is completed, the BusyIndicator is disabled. The Qtimer that is fired after disabling BusyIndicator, also takes 40+ sec to timeout for the first time, then it is recovering and firing for every 20ms subsequently. Because of this, as soon as the BusyIndicator is disabled and any valid page is displayed, the UI in that valid page is not responding for those 40+ seconds.
Questions:
- Why BusyIndicator is affecting the Qtimer's timeout value?
- Is there any way where the BusyIndicator does not affect the Qtimer timeout value?
- Any other solution for the issue that I'm facing?
Note: I created a dummy project in QtCreator and created a demo Desktop based application(in both Windows and Ubuntu) with the same scenario(i.e QTimer being interrupted for some time by a blocking heavy task), I could not see any issue(QTimer fires immediately after the blocking task is completed). I'm assuming that this issue might be specific to embedded applications.
Thanks in Advance