blob: de5c37ac3bea1cce0f7505b1708b4e3f8c61d8e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import os
import sys
_simulator = False
def simulator():
global _simulator
return _simulator
def set_simulator(s):
global _simulator
_simulator = s
is_android = os.environ.get('ANDROID_ARGUMENT')
def error_not_nuitka():
"""Errors and exits for macOS if run in interpreted mode.
"""
is_nuitka = "__compiled__" in globals()
if not is_nuitka and sys.platform == "darwin":
print("This example does not work on macOS when Python is run in interpreted mode."
"For this example to work on macOS, package the example using pyside6-deploy"
"For more information, read `Notes for Developer` in the documentation")
sys.exit(0)
|