diff options
Diffstat (limited to 'sources/pyside-tools/qml.py')
-rw-r--r-- | sources/pyside-tools/qml.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/pyside-tools/qml.py b/sources/pyside-tools/qml.py index 61e0e8ff9..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 @@ -215,7 +215,7 @@ if __name__ == "__main__": if apptype == "core": component = QQmlComponent(engine, qml_file) obj = component.create() - filtered_attributes = {k: v for k, v in vars(obj).items() if type(v) != SignalInstance} + filtered_attributes = {k: v for k, v in vars(obj).items() if type(v) is not SignalInstance} logging.info("qml: component object attributes are") pprint(filtered_attributes) del engine @@ -227,7 +227,7 @@ if __name__ == "__main__": sys.exit(-1) qquick_view = False - if type(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) |