Search code examples
c++qtportable-applications

Qt - Get system information


I'm looking for a (portable) way to get system information, i.e cpu clock and manufacturer, available memory, etc.

Is there a way to do this with Qt or do I have to write OS specific code?


Solution

  • I don't think that there is anything built into Qt to get these kind of details. On linux, all of this is available through /proc/cpuinfo. If you are targeting other platforms, you may want to just go directly to using the cpuid instruction (assuming x86/x86-64).