PDA

View Full Version : QT Runtime OS Version



sgg245
11th November 2008, 10:55
I want to know an API using which I can know the QT Runtime OS Type.

Using qVersion() in QtGlobal I can know the OS Version.

Similary I want to know an API for OS Type like I am using Ubuntu Linux then it should return similar sort of string...

Thanks in advance...

wysota
17th November 2008, 09:42
You want the distribution name? Qt won't help you with that, you have to read system configuration files or parse result of uname.

Ginsengelf
17th November 2008, 16:58
Hi, you can also check for a file in /etc/. It is normaly called something like SuSE-release, fedora-release and so on. It contains the version of the distribution.

Ginsengelf

susan_arr
20th August 2012, 13:53
If I'm not mistaken, qVersion() won't supply you with OS version information.
For details: http://doc.qt.nokia.com/4.7-snapshot/qtglobal.html#qVersion