Solved QHostInfo::localHostName() never give my hostname (archlinux)
-
why
qDebug() << QHostInfo::localHostName();
not show my hostname ?From terminal, command "hostname" give me my hostname...
what's happen ? what i forget or misunderstand about QHostInfo ?
If QHostLocalHostName::localHostName() not show hostname fromlocalhost, what is the interest of this function ? -
Hi,
What do you get and what do you expect ?
On what OS ?
-
@SGaist
os is in the title: archlinux (and Qt-5.5.1-9)
i get exactly:
QHostAddress("")but my machine name get by command "hostname" is exactly:
archlinux-jerome -
when i do an application just for that, it worked. Then now, suddenly (no do nothing more), in my application, it works also.
strange... i don't know why but... ok... now it works.
thank you.