aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside-tools
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-03-14 12:12:13 +0100
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-03-14 14:13:28 +0100
commit76b01d1b19c0e218b6e06c6a8a18a8a1ff8cb5e6 (patch)
treee6f00d11fc18313973900ffc37fc3203e10a2e7d /sources/pyside-tools
parent476f2235bc7bc2632b620d9e4de4bf720a50f7f3 (diff)
pyside6-qml: error fix
- QQuickView should be used when the rootobject is a QQuickItem. Pick-to: 6.6 Task-number: PYSIDE-2640 Change-Id: I1ee866d7fbd732500111db139f052f4bd3024740 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside-tools')
-rw-r--r--sources/pyside-tools/qml.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside-tools/qml.py b/sources/pyside-tools/qml.py
index d76e5c5c9..5d029f93d 100644
--- a/sources/pyside-tools/qml.py
+++ b/sources/pyside-tools/qml.py
@@ -16,7 +16,7 @@ from typing import List, Set
from PySide6.QtCore import QCoreApplication, Qt, QLibraryInfo, QUrl, SignalInstance
from PySide6.QtGui import QGuiApplication, QSurfaceFormat
from PySide6.QtQml import QQmlApplicationEngine, QQmlComponent
-from PySide6.QtQuick import QQuickView, QQuickWindow
+from PySide6.QtQuick import QQuickView, QQuickItem
from PySide6.QtWidgets import QApplication
@@ -227,7 +227,7 @@ if __name__ == "__main__":
sys.exit(-1)
qquick_view = False
- if isinstance(rootObjects[0], QQuickWindow) and qquick_present:
+ if isinstance(rootObjects[0], QQuickItem) and qquick_present:
logging.info("qml: loading with QQuickView")
viewer = QQuickView()
viewer.setSource(qml_file)