Show the name of my team with QT

0

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?

    
asked by Perl 17.10.2016 в 19:25
source

1 answer

1

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() .

    
answered by 18.10.2016 / 09:09
source