@JonB said in How can I wait all request complate?:
main() is no good for a Qt program
I gave main() as an example. To show that there is a continuous data flow to the doSth function.
@JonB said in How can I wait all request complate?:
But if you really want to write your code to "block" and "wait" for a response, use a local QEventLoop instance and call exec(). This is at least an "efficient" way to do it. A couple of examples on stackoverflow illustrating just this for your QNetworkReply::finished case:
https://stackoverflow.com/questions/29449561/qeventloop-proper-usage
https://stackoverflow.com/questions/54694312/qeventloop-wait-for-only-local-events-not-main-loop-events
Thank you I will look them