I'm writing a weather forecast system, because of the API, weather conditions and for air quality situation is need two different request url, a url I can achieve and complete on the interpretation of data, but the two requests, I don't know how to send the second request and how to access data, refer to
CodePudding user response:
Use a synchronous request after completion of the first url send signals to execute the second url
The QEventLoop _loop;
The connect (m_reply, & amp; QNetworkReply: : finished, & amp; _loop, & amp; QEventLoop: : quit);
_loop. The exec ();