View Full Version : How can i terminate a delay / wait condition

22nd February 2011, 13:53
Hello All,

I would like to know if there is any way to terminate a wait / delay condition.
I am using QTest::qwait(ms) for adding responsive delay in my code. Now i would like to terminate/break this delay. Something like, QTest::qWait(2000) will start a 2 sec delay, so what should i do to terminate this 2 sec wait time.

Note: QTimer is not suitable for my code and i am using Qtest:qwait for adding the delay.

I hope i made the question clear, Any suggestions in this regard would be really helpful.


22nd February 2011, 15:41
If you want a delay that's shorter than a predefined amount of time, then don't use qWait() but rather use some other apporach. In other words you are approaching the problem from a wrong end.