diff options
Diffstat (limited to 'examples/quick3d/proceduraltexture/main.py')
-rw-r--r-- | examples/quick3d/proceduraltexture/main.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/quick3d/proceduraltexture/main.py b/examples/quick3d/proceduraltexture/main.py new file mode 100644 index 000000000..a732cc015 --- /dev/null +++ b/examples/quick3d/proceduraltexture/main.py @@ -0,0 +1,30 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from PySide6.QtGui import QGuiApplication +from PySide6.QtQml import QQmlApplicationEngine + +from gradienttexture import GradientTexture # noqa: F401 + +from pathlib import Path + +import os +import sys + +if __name__ == "__main__": + app = QGuiApplication(sys.argv) + app.setOrganizationName("QtProject") + app.setApplicationName("ProceduralTexture") + + engine = QQmlApplicationEngine() + app_dir = Path(__file__).parent + engine.addImportPath(os.fspath(app_dir)) + engine.loadFromModule("ProceduralTextureModule", "Main") + + if not engine.rootObjects(): + sys.exit(-1) + + ex = app.exec() + del engine + + sys.exit(ex) |