Yes, nowadays it is recommended to use QNetworkAccessManager - he knows how to make requests, parallelize and other buns.
The most minimal example ( taken here ):
QNetworkAccessManager *manager = new QNetworkAccessManager(this); connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*))); manager->get(QNetworkRequest(QUrl("http://qt-project.org")));
The first line created a manager (he needed one for the whole project). The second line connected the signal about the completion of the request with the slot (this line is also usually one for the whole project). And the third is actually a request. In the replyFinished slot, a replyFinished arrives that is contained in QNetworkReply. This object has a readAll method that allows you to get an answer, somewhere like that.
QByteArray data=reply->readAll();
this object also contains a link to the original request, so you can find out the url where the request was.
In general, I recommend starting with the study of this example .
In this task, there is one more thing that many people stumble upon and cannot understand - everything seems to have been added to include, but qt creator / qmake does not see it. But this is simply solved - you need to open the project file (with the pro extension) and add such a line (somewhere above, there will be similar lines).
QT += network
Ping can be sent to the site, but I do not see much point in this. But if you really, really want, then of course you can. SO is an example.