I can't seem to find in the documentation how one can check whether there is an active internet connection available. I was looking at the QNetworkSession class but can't seem to work it out.
Thanks
I can't seem to find in the documentation how one can check whether there is an active internet connection available. I was looking at the QNetworkSession class but can't seem to work it out.
Thanks
Maybe through this?
http://qt-project.org/doc/qt-5.0/qtn....html#isOnline
Cheers,
_
Thanks. I did try that. Returns true even when there isn't any connectivity.
I think the only way is to try to connect to a server at a well-known address.
Right, depends on what kind of information the thread starter was looking for.
Obviously if the question is "can I reach a specific host" then the only way to determine that is to try to connect to it.
The network configuration classes only tell you if there is even a point in trying that, i.e. if there is no connected network interface then any attempt will fail locally already.
Cheers,
_
Bookmarks