diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-03-18 19:35:52 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-04-18 05:00:57 +0200 |
commit | d5bf42f75b0ae35b7f02bb9211787ae1d44a98ba (patch) | |
tree | 3aa389137752dbe2bbaa7446e4ef0e2e1b8c55a5 /src/corelib/global/qsystemdetection.h | |
parent | bf2ed624091d0239bce91a84df59b7afc843298a (diff) |
Add preliminary support for Qt for visionOS
Qt already runs on Vision Pro as "Designed for iPad", using Qt
for iOS. This change enables building Qt for visionOS directly,
which opens the door to visionOS specific APIs and use-cases
such as volumes and immersive spaces.
The platform removes some APIs we depend on, notably UIScreen,
so some code paths have been disabled or mocked to get something
up and running.
As our current window management approach on UIKit platforms
depends on UIWindow and UIScreen there is currently no way to
bring up QWindows. This will improve once we refactor our
window management to use window scenes.
To configure for visionOS, pass -platform macx-visionos-clang,
and optionally add -sdk xrsimulator to build for the simulator.
Change-Id: I4eda55fc3fd06e12d30a188928487cf68940ee07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'src/corelib/global/qsystemdetection.h')
-rw-r--r-- | src/corelib/global/qsystemdetection.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index d797a19600..b29f2e9496 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -19,6 +19,7 @@ IOS - iOS WATCHOS - watchOS TVOS - tvOS + VISIONOS - visionOS WIN32 - Win32 (Windows 2000/XP/Vista/7 and Windows Server 2003/2008) CYGWIN - Cygwin SOLARIS - Sun Solaris @@ -61,6 +62,8 @@ # define Q_OS_WATCHOS # elif defined(TARGET_OS_TV) && TARGET_OS_TV # define Q_OS_TVOS +# elif defined(TARGET_OS_VISION) && TARGET_OS_VISION +# define Q_OS_VISIONOS # else # // TARGET_OS_IOS is only available in newer SDKs, # // so assume any other iOS-based platform is iOS for now |