I am trying to wrap a JS Async call with deferred so that I can get the response back. This function is a QtWebEngine
function and hence it is asynchronous. However I want to be able to wait for the response.
deferred = $.Deferred();
result = deferred.resolve(host.callMethod());
$.when(result.promise()).done(function(value)
{
alert(value)
});
I was expecting that the value to the call back will be the output of the Host.callMethod
.
Your help is appreciated.