QList<QNetworkInterface> networkinterfaces = QNetworkInterface::allInterfaces();
foreach (QNetworkInterface interfaces, networkinterfaces) {
foreach (QNetworkAddressEntry entry, interfaces.addressEntries())
{
QHostAddress broadcastAddress = entry.broadcast();
if (broadcastAddress != QHostAddress::Null
&& entry.ip() != QHostAddress::LocalHost
&& entry.ip().protocol() == QAbstractSocket::IPv4Protocol
)
{
QJsonObject jsonObjectip,jsonObject;
jsonObjectip.insert("IP", (entry.ip()).toString());
jsonObject.insert("content", jsonObjectip);
jsonObject.insert("Title","notify_door_gateway");

QJsonDocument jsonDocument;
jsonDocument.setObject(jsonObject);
QByteArray dataArray = jsonDocument.toJson();
m_udpSocket->writeDatagram(dataArray,broadcastAddress, 8082);
}

}

}