Hi all!

I am trying to get the host name from a IP inside my LAN using QHostInfo.

This is my code:
Qt Code:
  1. bool rede::verificaIP(QString ip)
  2. {
  3. info.setAddresses();
  4. QHostInfo info = QHostInfo::fromName(ip);
  5.  
  6. qDebug() << "IP:" << info.hostName() << info.addresses();
  7.  
  8. return false;
  9. }
To copy to clipboard, switch view to plain text mode 

The ip parameter is 192.168.1.91

But the result is:
IP: "192.168.1.91" (QHostAddress("192.168.1.91") )

The function does not returns the host name

Can anyone help me?

Thanks a lot.