From QHostInfo get QHostadress
-
Did you try "this?":http://qt-project.org/doc/qt-5/qhostinfo.html#addresses
-
Hi,
What solution are you thinking about ?
-
Oh, I solved this problem without using this classes, I just changed my program model :) But I think about solution like this
@
QList<QHostAddress> buff=info.addresses();
for(int i=0;i<buff.size();++i)
{
QHostInfo temp=QHostInfo::fromName(buff[i].toString());
if(name ==temp.hostName()) return buff[i];
}
@
Something like this? Or I didn't understand those classes?