aboutsummaryrefslogtreecommitdiffstats
path: root/examples/demos/osmbuildings/main.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-09-24 13:59:10 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-10-18 08:20:14 +0000
commitab3c2cbea48b8f1ecfd19bbe1c6116d7734ee9d1 (patch)
tree794ea3f049ea764a095778b27c62330050d15134 /examples/demos/osmbuildings/main.py
parenta86135803fe51e5702444f8b7dcb2a4dccd3a209 (diff)
Port the osmbuildings demo (maps part)
The buildings part was omitted as it requires a license key. Task-number: PYSIDE-2206 Pick-to: 6.8 Change-Id: I561fb098786d9e894e5102073db3e7d02f66d8f9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/demos/osmbuildings/main.py')
-rw-r--r--examples/demos/osmbuildings/main.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/demos/osmbuildings/main.py b/examples/demos/osmbuildings/main.py
new file mode 100644
index 000000000..67a399766
--- /dev/null
+++ b/examples/demos/osmbuildings/main.py
@@ -0,0 +1,23 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import sys
+from pathlib import Path
+
+from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtCore import QCoreApplication
+
+from manager import OSMManager, CustomTextureData # noqa: F401
+
+
+if __name__ == "__main__":
+ app = QGuiApplication(sys.argv)
+ engine = QQmlApplicationEngine()
+ engine.addImportPath(Path(__file__).parent)
+ engine.loadFromModule("OSMBuildings", "Main")
+ if not engine.rootObjects():
+ sys.exit(-1)
+ ex = QCoreApplication.exec()
+ del engine
+ sys.exit(ex)