<QtSystemDetection> - Platform-specific Macro Definitions

The <QtSystemDetection> header file includes various platfrom-specific macros. 更多...

头: #include <QtSystemDetection>

Q_OS_AIX
Q_OS_ANDROID
Q_OS_BSD4
Q_OS_CYGWIN
Q_OS_DARWIN
Q_OS_FREEBSD
Q_OS_HPUX
Q_OS_HURD
Q_OS_IOS
Q_OS_LINUX
Q_OS_LYNX
Q_OS_MAC
Q_OS_MACOS
Q_OS_NETBSD
Q_OS_OPENBSD
Q_OS_OSX
Q_OS_QNX
Q_OS_SOLARIS
Q_OS_TVOS
Q_OS_UNIX
Q_OS_WASM
Q_OS_WATCHOS
Q_OS_WIN32
Q_OS_WIN64
Q_OS_WIN
Q_OS_WINDOWS

详细描述

The <QtSystemDetection> header file declares a range of macros (Q_OS_*) that are defined for the specified platforms. For example, Q_OS_UNIX which is defined for Unix-based systems.

The purpose of these macros is to enable programmers to add platform-specific code to their application.

宏文档编制

Q_OS_AIX

Defined on AIX.

Q_OS_ANDROID

Defined on Android.

Q_OS_BSD4

Defined on any BSD 4.4 system.

Q_OS_CYGWIN

Defined on Cygwin.

Q_OS_DARWIN

Defined on Darwin-based operating systems such as macOS, iOS, watchOS, and tvOS.

Q_OS_FREEBSD

Defined on FreeBSD.

Q_OS_HPUX

Defined on HP-UX.

Q_OS_HURD

Defined on GNU Hurd.

Q_OS_IOS

Defined on iOS.

Q_OS_LINUX

Defined on Linux.

Q_OS_LYNX

Defined on LynxOS.

Q_OS_MAC

Deprecated synonym for Q_OS_DARWIN 。不使用。

Q_OS_MACOS

Defined on macOS.

Q_OS_NETBSD

Defined on NetBSD.

Q_OS_OPENBSD

Defined on OpenBSD.

Q_OS_OSX

Deprecated synonym for Q_OS_MACOS 。不使用。

Q_OS_QNX

Defined on QNX Neutrino.

Q_OS_SOLARIS

Defined on Sun Solaris.

Q_OS_TVOS

Defined on tvOS.

Q_OS_UNIX

Defined on any UNIX BSD/SYSV system.

Q_OS_WASM

Defined on Web Assembly.

Q_OS_WATCHOS

Defined on watchOS.

Q_OS_WIN32

Defined on 32-bit and 64-bit versions of Windows.

Q_OS_WIN64

Defined on 64-bit versions of Windows.

Q_OS_WIN

Defined on all supported versions of Windows. That is, if Q_OS_WIN32 or Q_OS_WIN64 有定义。

Q_OS_WINDOWS

This is a synonym for Q_OS_WIN .