I tried to call QCoreApplication::quit() and application terminated at that point.

I will try alternative method also.

Thanks.