Unsolved How to get the return value synchronously, when invoking a slot method with qwebchannel.js?
-
Hi guys,I had read the help document about qwebchannel.js as the picture shows, but I want to get the return value synchronously. How should i do ? Can i get the return value synchronously? Thank you!
-
Is this the js function? You can invoke Qt's function or emit signal from callback,the value passed through param
hope to help you
-
@MsLiu said in How to get the return value synchronously ,when invoking a slot medthod with qwebchannel.js?:
You can invoke Qt's functio
Thanks for your help! But I Want get the return value synchronously ,not asynchronously. How should i do?
-
You can synchronize with the semaphore by yourself ,You can wait in invoke function until callback function return
hope to help you -
I am also in need to sync call from JS side to c++ side using QWebChannels. I have a list which populates and then i need to serve it to the JS side. How should i do it ?