QHostInfo
Detailed Description
The QHostInfo class provides static functions for host name lookups.
QHostInfo uses the lookup mechanisms provided by the operating system to find the IP address(es) associated with a host name, or the host name associated with an IP address. The class provides two static convenience functions: one that works asynchronously and emits a signal once the host is found, and one that blocks and returns a QHostInfo object.
To look up a host's IP addresses asynchronously, call lookupHost(), which takes the host name or IP address, a receiver object, and a slot signature as arguments and returns an ID. You can abort the lookup by calling abortHostLookup() with the lookup ID.
Example:
// To find the IP address of qtsoftware.com
QHostInfo::lookupHost("qtsoftware.com",
this, SLOT(printResults(QHostInfo)));
// To find the host name for 4.2.2.1
QHostInfo::lookupHost("4.2.2.1",
this, SLOT(printResults(QHostInfo)));