blob: 340d35a9f0cdfc3ebcd553dac0499e93d6d13304 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from __future__ import annotations
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.GraphicsApi.OpenGLRhi)
window = WindowSingleThreaded()
window.resize(1024, 768)
window.show()
ex = app.exec()
del window
sys.exit(ex)
|