aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery/gallery.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/gallery/gallery.py')
-rw-r--r--examples/quickcontrols2/gallery/gallery.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.py b/examples/quickcontrols2/gallery/gallery.py
index 69755f2b0..2b3453395 100644
--- a/examples/quickcontrols2/gallery/gallery.py
+++ b/examples/quickcontrols2/gallery/gallery.py
@@ -87,7 +87,11 @@ if __name__ == "__main__":
engine.rootContext().setContextProperty("builtInStyles", built_in_styles)
engine.load(":/gallery.qml")
- if not engine.rootObjects():
+ rootObjects = engine.rootObjects()
+ if not rootObjects:
sys.exit(-1)
+ window = rootObjects[0]
+ window.setIcon(QIcon(':/qt-project.org/logos/pysidelogo.png'))
+
sys.exit(app.exec_())