9 #include <QNetworkInterface>
10 #include <QHostAddress>
24 QList<QHostAddress> list(QNetworkInterface::allAddresses());
32 for (QList<QHostAddress>::const_iterator it(list.begin()); it != list.end(); ++it) {
33 if (*it == QHostAddress::LocalHost || *it == QHostAddress::LocalHostIPv6)
36 ret.append(it->toString());
44 static const QString find(
"|%1|");
45 return list.contains(find.arg(address), Qt::CaseSensitive);
bool isAddressInList(const QString &list, const QString &address)
QString interfaceAddressesToString()
Returns list of all addresses assigned to the interfaces of this machine.