Im new in Qt and im trying to understand the following signal-slot connection:
m_networkManager = new QNetworkAccessManager(this);
QNetworkReply *reply = m_networkManager->get(request);
connect(reply, SIGNAL(finished()),this, SLOT(onRequestCompleted()));
Why we connect the "finished" signal after the get-request?...What happened, if the network connection in line-2 was faster executed before the slot connection (line-3) was made?
I know, that this code will work. but i want to understand how this is possible :)