O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the connectivity state

Before trying to access a network resource, it's useful to check whether you have an active connection to the internet. Qt allows you to check whether the computer, mobile device, or tablet is online. You can even start a new connection if the operating system supports it.

The relevant API mainly consists of four classes. QNetworkConfigurationManager is the base and starting point. It holds all network configurations available on the system. Furthermore, it provides information about the network capabilities, for example, whether you can start and stop interfaces. The network configurations found by it are stored as QNetworkConfiguration classes.

QNetworkConfiguration holds all information about an access ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required