Internet: what type of connection?
-
How to get to know if the user is connected to internet?
-
You try to connect to some server on the internet. If that works, then the user is connected.
You can also query the OS whether the computer is connected to the network, but that kind of access does not guarantee that you can talk to the internet (or the server you care about).
-
I am agree with ~Tobias. If you want to check internet access it will be the best solution to try to load light-weight page. If reply does not have any errors - internet connection is OK.
It's very simple to do with QNetworkAccessManager.
-
Seems to me that this is what [[doc:QNetworkSession]] and [[doc:QNetworkConfiguration]] are meant for?