Hello, that's the code:
Qt Code:
  1. sock.connectToHost("www.gamato.info", 80);
  2. if (sock.waitForConnected(15000))
  3. qDebug("Connected!");
  4. else
  5. qDebug("Not connected!");
To copy to clipboard, switch view to plain text mode 
I chose gamato.info as it is an unresponsive server and I noticed that the whole application hangs for 15 seconds.
The function in which this runs is static and cannot be run through QtConcurrentRun!
The actual problem is checking if internet connection is established or not, but this way I take the non-rare situation in which internet connection may be established locally but modem not connected etc.
I need a way