I have an application which runs a tool that requires network connection. Now my aim is to check whether the user has a network connection, if he don\'t have one, i can stra
I assume that by "network connection" you mean "internet connection", i.e. you don't care about LAN or some ad-hoc networks between your desktop and mobile.
The easiest way is just to connect to the internet service your application needs and let OS handle the network request. If you get the reply, there is a connection, if the request times out, there is no connection.
You can check state of network interface through QNetworkInterface::flags(), but this doesn't give you the information about the network the interface is connected to: the interface might be up, but connected only to LAN without internet access.