diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-09-15 13:21:53 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-09-16 10:30:36 +0200 |
| commit | cf32b66adbfb489cd6e5d5c0bf3f741b59ba204c (patch) | |
| tree | 44be69c9487f5d4db1092d061a555bd6001c1ab4 /examples/declarative/window/main.py | |
| parent | b20d6f6906f91f9df608d7800f4e27f7a7160abe (diff) | |
Move examples around
Change the directory structure to closer match that of Qt.
Task-number: PYSIDE-841
Change-Id: I87aca346b6654aafe94dd1fb83c184c182ceb2e6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/declarative/window/main.py')
| -rw-r--r-- | examples/declarative/window/main.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/examples/declarative/window/main.py b/examples/declarative/window/main.py deleted file mode 100644 index 8f8260b56..000000000 --- a/examples/declarative/window/main.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import os -from pathlib import Path -import sys - -from PySide6.QtCore import QUrl, qWarning -from PySide6.QtGui import QGuiApplication -from PySide6.QtQml import QQmlComponent, QQmlEngine -from PySide6.QtQuick import QQuickWindow - -import window_rc - -# Append the parent directory of this file so that Python can find and -# import from the "shared" sibling directory. -sys.path.append(os.fspath(Path(__file__).parent.parent)) -from shared import shared_rc - - -if __name__ == "__main__": - app = QGuiApplication(sys.argv) - engine = QQmlEngine() - - # Add the qrc root as QML import path so that the "shared" module - # can be found. - engine.addImportPath(":/") - - component = QQmlComponent(engine) - QQuickWindow.setDefaultAlphaBuffer(True) - component.loadUrl(QUrl("qrc:///window/window.qml")) - if component.isReady(): - component.create() - else: - qWarning(component.errorString()) - app.exit(1) - app.exec() |
