diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-02-10 14:05:29 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-02-10 14:26:43 +0100 |
commit | ac7365aa78d78a3693c46e2177df3216d0a40628 (patch) | |
tree | b7c5e23fcf301cf059bceb427398798a3e249f90 /examples/quickcontrols2 | |
parent | b35ab123dff10c6c0a3b65b7c8865a6ed054c923 (diff) |
PySide6: Add the logo as a resource to libpyside
Use it in prominent examples.
Pick-to: 6.0
Change-Id: Ifee67802194931bbd56fbe6e6bfa4f3c18fda781
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/quickcontrols2')
-rw-r--r-- | examples/quickcontrols2/gallery/gallery.py | 6 |
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_()) |