i\'m trying to get computer\'s state in my LAN... thought about using QTcpSocket but it\'s not realy effective since port also should be inserted as:
socket-
One good way is just to verify that they can resolve domain names using QHostInfo. If they can then they likely have internet access:
QHostInfo::lookupHost("www.kde.org", this, SLOT(lookedUp(QHostInfo)));
Of course, you could just try to connect to the host as well, which is even better proof that everything is working correctly. I would do it asynchronously rather than synchronously, but it's truly the best test.