PDA

View Full Version : Detect operating system, physical memory and other system information



mvbhavsar
19th March 2011, 07:36
I want to collect information that what is current OS, how physical memory (RAM) does the machine has, how much disk space etc. I tried to use QSysInfo but was not able to get what I am looking for.
Also in some document it is written that QSysInfo::WindowsVersion() function is there but this is also missing in QSysInfo. QSysInfo has very few options.

wysota
19th March 2011, 09:14
It's hard to gather such information from a single source and definitely not in a cross-platform way. On Unix you'd have to parse some files in /proc, for example.

mvbhavsar
20th March 2011, 04:43
Does is required to modify .pro file to get all options of QSysInfo::WindowsVersion()

squidge
20th March 2011, 10:50
How are you trying to access them?

mvbhavsar
21st March 2011, 09:50
How can get available physical memory on windows platform?

wysota
21st March 2011, 09:56
http://www.lmgtfy.com?q=How+can+get+available+physical+me mory+on+windows+platform?

mvbhavsar
21st March 2011, 10:01
it is leading to only google search page for this phrase. I want to calculate available physical memory on a machine using QT.

wysota
21st March 2011, 10:07
it is leading to only google search page for this phrase.
Congratulations, that was the idea. Now look at the results and follow the one that looks like it knows how to calculate available physical memory using C++.

squidge
21st March 2011, 12:40
Qt is a framework, not a language. If you can't see the functionality in the Qt documentation, then look for a C++ solution. It's not difficult, Wysota even created the google query for you.