Hi i want to show the name of my pc in one application i did for myself only. I can show my user with QDir::homepath() But i can't show my for example name of pc. Thx in advance.
Hi i want to show the name of my pc in one application i did for myself only. I can show my user with QDir::homepath() But i can't show my for example name of pc. Thx in advance.
I don't think there is any API in Qt for retrieving the hostname, you will have to consult your operating system's API documentation for that.
Cheers,
_
You can try QHostInfo::localHostName() or QSysInfo::machineHostName() and see if those return what you're looking for.
I write the best type of code possible, code that I want to write, not code that someone tells me to write!
anda_skoa (18th October 2016)
Oh, the latter looks interesting, nevery seen it before
Cheers,
_
Bookmarks