Home · All Classes · Modules |
The QSysInfo class provides information about the system. More...
The QSysInfo class provides information about the system.
Some constants are defined only on certain platforms. You can use the preprocessor symbols Q_WS_WIN and Q_WS_MAC to test that the application is compiled under Windows or Mac.
Constant | Value | Description |
---|---|---|
QSysInfo.BigEndian | 0 | Big-endian byte order (also called Network byte order) |
QSysInfo.LittleEndian | 1 | Little-endian byte order |
QSysInfo.ByteOrder | <platform-dependent> | Equals BigEndian or LittleEndian, depending on the platform's byte order. |
This enum provides platform-specific information about the sizes of data structures used by the underlying architecture.
Constant | Value | Description |
---|---|---|
QSysInfo.WordSize | ( sizeof( void * ) <<3 ) | The size in bits of a pointer for the platform on which the application is compiled (32 or 64). |
This enum provides symbolic names for the various versions of the Windows operating system. On Windows, the QSysInfo.WindowsVersion variable gives the version of the system on which the application is run.
MS-DOS-based versions:
Constant | Value | Description |
---|---|---|
QSysInfo.WV_32s | 0x0001 | Windows 3.1 with Win 32s |
QSysInfo.WV_95 | 0x0002 | Windows 95 |
QSysInfo.WV_98 | 0x0003 | Windows 98 |
QSysInfo.WV_Me | 0x0004 | Windows Me |
NT-based versions (note that each operating system version is only represented once rather than each Windows edition):
Constant | Value | Description |
---|---|---|
QSysInfo.WV_NT | 0x0010 | Windows NT (operating system version 4.0) |
QSysInfo.WV_2000 | 0x0020 | Windows 2000 (operating system version 5.0) |
QSysInfo.WV_XP | 0x0030 | Windows XP (operating system version 5.1) |
QSysInfo.WV_2003 | 0x0040 | Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2) |
QSysInfo.WV_VISTA | 0x0080 | Windows Vista, Windows Server 2008 (operating system version 6.0) |
QSysInfo.WV_WINDOWS7 | 0x0090 | Windows 7, Windows Server 2008 R2 (operating system version 6.1) |
Alternatively, you may use the following macros which correspond directly to the Windows operating system version number:
Constant | Value | Description |
---|---|---|
QSysInfo.WV_4_0 | WV_NT | Operating system version 4.0, corresponds to Windows NT |
QSysInfo.WV_5_0 | WV_2000 | Operating system version 5.0, corresponds to Windows 2000 |
QSysInfo.WV_5_1 | WV_XP | Operating system version 5.1, corresponds to Windows XP |
QSysInfo.WV_5_2 | WV_2003 | Operating system version 5.2, corresponds to Windows Server 2003, Windows Server 2003 R2, Windows Home Server, and Windows XP Professional x64 Edition |
QSysInfo.WV_6_0 | WV_VISTA | Operating system version 6.0, corresponds to Windows Vista and Windows Server 2008 |
QSysInfo.WV_6_1 | WV_WINDOWS7 | Operating system version 6.1, corresponds to Windows 7 and Windows Server 2008 R2 |
CE-based versions:
Constant | Value | Description |
---|---|---|
QSysInfo.WV_CE | 0x0100 | Windows CE |
QSysInfo.WV_CENET | 0x0200 | Windows CE .NET |
QSysInfo.WV_CE_5 | 0x0300 | Windows CE 5.x |
QSysInfo.WV_CE_6 | 0x0400 | Windows CE 6.x |
The following masks can be used for testing whether a Windows version is MS-DOS-based, NT-based, or CE-based:
Constant | Value | Description |
---|---|---|
QSysInfo.WV_DOS_based | 0x000f | MS-DOS-based version of Windows |
QSysInfo.WV_NT_based | 0x00f0 | NT-based version of Windows |
QSysInfo.WV_CE_based | 0x0f00 | CE-based version of Windows |
See also MacVersion and SymbianVersion.
This member should be treated as a constant.
This variable holds the version of the Windows operating system on which the application is run (Windows only).
PyQt 4.9.4 for Windows | Copyright © Riverbank Computing Ltd and Nokia 2012 | Qt 4.8.2 |