void downloadFinished(QNetworkReply *reply) { if (reply->error() == QNetworkReply::NoError) { QByteArray data = reply->readAll(); qDebug() << "Read all data" << data.size() << "bytes"; qDebug() << "Bytes available to read:" << reply->bytesAvailable(); } else { qDebug() << "Error:" << reply->errorString(); } reply->deleteLater(); }In this example, we create a function downloadFinished() that will be called when a download network request is finished. Inside the function, we check for errors, read all the data using the readAll() method, print the size of the data, and then use the bytesAvailable() method to check how many bytes are left to read. Package library: Qt Network Module