blob: ee885ae6d0e82af2c5084a8e75bfd34c13929a69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtGui import QGuiApplication
from PySide6.QtQuick import QQuickWindow, QSGRendererInterface
from window_singlethreaded import WindowSingleThreaded
if __name__ == "__main__":
app = QGuiApplication(sys.argv)
# only functional when Qt Quick is also using OpenGL
QQuickWindow.setGraphicsApi(QSGRendererInterface.OpenGLRhi)
window = WindowSingleThreaded()
window.resize(1024, 768)
window.show()
ex = app.exec()
del window
sys.exit(ex)
|