diff options
Diffstat (limited to 'examples/graphs/2d/hellographs/main.py')
-rw-r--r-- | examples/graphs/2d/hellographs/main.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/graphs/2d/hellographs/main.py b/examples/graphs/2d/hellographs/main.py new file mode 100644 index 000000000..acc349beb --- /dev/null +++ b/examples/graphs/2d/hellographs/main.py @@ -0,0 +1,22 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +"""PySide6 port of the Qt Hello Graphs example from Qt v6.x""" + +from pathlib import Path +import sys +from PySide6.QtGui import QGuiApplication +from PySide6.QtQuick import QQuickView + + +if __name__ == '__main__': + app = QGuiApplication(sys.argv) + + viewer = QQuickView() + viewer.engine().addImportPath(Path(__file__).parent) + viewer.setColor("black") + viewer.loadFromModule("HelloGraphs", "Main") + viewer.show() + r = app.exec() + del viewer + sys.exit(r) |