From 595e4764210f97c4caf92ac5bddbd3d80c95a660 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 29 Sep 2021 21:52:39 +0200 Subject: Fix Qt Quick Control2 example to work Use QUrl.fromLocalFile() for the QML file. Change-Id: I9433e3ae5c26e9db24d2b8ee4984e948fefa9aef Reviewed-by: Cristian Maureira-Fredes (cherry picked from commit 2e291350fd6294912bf29680a76819400ad693b7) Reviewed-by: Qt Cherry-pick Bot --- examples/quickcontrols2/gallery/gallery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/quickcontrols2/gallery/gallery.py b/examples/quickcontrols2/gallery/gallery.py index f4c3f3795..adb6896f8 100644 --- a/examples/quickcontrols2/gallery/gallery.py +++ b/examples/quickcontrols2/gallery/gallery.py @@ -60,7 +60,7 @@ import sys import platform from PySide6.QtGui import QGuiApplication, QIcon -from PySide6.QtCore import QSettings +from PySide6.QtCore import QSettings, QUrl from PySide6.QtQml import QQmlApplicationEngine from PySide6.QtQuickControls2 import QQuickStyle @@ -88,7 +88,7 @@ if __name__ == "__main__": built_in_styles.append("Windows") engine.setInitialProperties({"builtInStyles": built_in_styles}) - engine.load(":/gallery.qml") + engine.load(QUrl.fromLocalFile(":/gallery.qml")) rootObjects = engine.rootObjects() if not rootObjects: sys.exit(-1) -- cgit v1.2.3