Hello in an application that made it to use it only I want to show the name of my team. It is possible to show the user's name in the following way:
QDir::homePath()
But what I want is to show the name of my team in my program is it possible?
Hello in an application that made it to use it only I want to show the name of my team. It is possible to show the user's name in the following way:
QDir::homePath()
But what I want is to show the name of my team in my program is it possible?
The computer name is an operating system dependent feature, depending on which one you are using, you will need to include certain headers and use certain functions.
For example, on Windows you should use GetComputerName
or GetComputerNameEx
available in Winbase.h
(included from Windows.h
) and in Linux you should use gethostname
available in unistd.h
.
On the other hand, Qt is cross-platform and offers facilities for common platform independent tasks, so maybe you can use QHostInfo::localHostName()
.