QList< QHostAddress > addresses = QHostInfo::fromName(QHostInfo::localHostName()).addresses();
void slGetListLocalIP(QStringList &listIP){ listIP.clear(); QList<QHostAddress> listAddr = QNetworkInterface::allAddresses(); for(int i = 0; i < listAddr.size(); i++) { if(listAddr.at(i).protocol() == QAbstractSocket::IPv4Protocol ) { QString ip = listAddr.at(i).toString(); listIP.append(ip); } }}