The error signal

Instead of dealing with errors in the slot connected to the finished() signal, you can use the reply's error() signal, which passes the error of the QNetworkReply::NetworkError type to the slot. After the error() signal has been emitted, the finished() signal will, most likely, also be emitted shortly.

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.