Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Internet: what type of connection?
spode last edited by
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).
tucnak last edited by
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.
andre last edited by
Seems to me that this is what [[doc:QNetworkSession]] and [[doc:QNetworkConfiguration]] are meant for?