QInstaller::SystemInfo Class
class QInstaller::SystemInfoProvides information about the operating system. More...
Header: | #include <SystemInfo> |
Inherits: | QObject |
Properties
|
|
Public Functions
SystemInfo(QObject *parent = 0) | |
QString | buildCpuArchitecture() const |
QString | currentCpuArchitecture() const |
QString | kernelType() const |
QString | kernelVersion() const |
QString | prettyProductName() const |
QString | productType() const |
QString | productVersion() const |
Property Documentation
[read-only]
buildCpuArchitecture : const QString
The architecture of the CPU that the application was compiled for, in text format.
Possible values include:
- "i386"
- "x86_64"
- "arm64"
Note: Note that this may not match the actual CPU that the application is running on if there's an emulation layer or if the CPU supports multiple architectures (like x86-64 processors supporting i386 applications). To detect that, use installer.currentCpuArchitecture()
Access functions:
QString | buildCpuArchitecture() const |
See also QSysInfo::buildCpuArchitecture() and currentCpuArchitecture().
[read-only]
currentCpuArchitecture : const QString
The architecture of the CPU that the application is running on, in text format.
Possible values include:
- "i386"
- "x86_64"
- "arm64"
Note: This function depends on what the OS will report and may not detect the actual CPU architecture if the OS hides that information or is unable to provide it. For example, a 32-bit OS running on a 64-bit CPU is usually unable to determine whether the CPU is actually capable of running 64-bit programs.
Access functions:
QString | currentCpuArchitecture() const |
See also QSysInfo::currentCpuArchitecture() and buildCpuArchitecture().
[read-only]
kernelType : const QString
The type of the operating system kernel the installer was compiled for. It is also the kernel the installer is running on, unless the host operating system is running a form of compatibility or virtualization layer.
For Windows, Linux, and macOS this will return:
- "winnt"
- "linux"
- "darwin"
On Unix systems, it returns the same as the output of uname -s
(lowercased).
Access functions:
QString | kernelType() const |
See also QSysInfo::kernelType().
[read-only]
kernelVersion : const QString
The release version of the operating system kernel. On Windows, it returns the version of the NT or CE kernel. On Unix systems, including macOS, it returns the same as the uname -r
command would return.
Example values are:
- "6.1.7601" for Windows 7 with Service Pack 1
- "3.16.6-2-desktop" for openSUSE 13.2 kernel 3.16.6-2
- "12.5.0" last release of OS X "Mountain Lion"
Access functions:
QString | kernelVersion() const |
See also QSysInfo::kernelVersion().
[read-only]
prettyProductName : const QString
A prettier form of SystemInfo::productType and SystemInfo::productVersion, containing other tokens like the operating system type, codenames and other information. The result of this function is suitable for displaying to the user.
Example values are:
- "Windows 7"
- "openSUSE 13.2 (Harlequin) (x86_64)"
- "OS X Mountain Lion (10.8)"
Access functions:
QString | prettyProductName() const |
See also QSysInfo::prettyProductName().
[read-only]
productType : const QString
The product name of the operating system this application is running in.
Example values are:
- "windows"
- "opensuse" (for the Linux openSUSE distribution)
- "macos"
Access functions:
QString | productType() const |
See also QSysInfo::productType().
[read-only]
productVersion : const QString
The product version of the operating system in string form. If the version could not be determined, this function returns "unknown".
Example values are:
- "7" for Windows 7
- "13.2" for openSUSE 13.2
- "10.8" for OS X Mountain Lion
Access functions:
QString | productVersion() const |
See also QSysInfo::productVersion().
Member Function Documentation
[explicit]
SystemInfo::SystemInfo(QObject *parent = 0)
Creates a system info object with the parent parent.
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.