Qt signal slot connection - QNetworkAccessManager

后端 未结 1 1076
闹比i
闹比i 2020-12-21 08:43

Im new in Qt and im trying to understand the following signal-slot connection:

m_networkManager = new QNetworkAccessManager(this);
QNetworkReply *reply = m_n         


        
相关标签:
1条回答
  • 2020-12-21 09:18

    It's not possible for the finished() signal to emit because you haven't yielded to the event loop yet. Even if somehow the get request got sent and then came back, your code is still executing and will continue to execute until you've yielded to the event loop. Only then will the reply object ever get a chance to actually do anything, such as parsing the get response and emitting the corresponding signal.

    0 讨论(0)
提交回复
热议问题