aboutsummaryrefslogtreecommitdiffstats
path: root/examples/opengl/contextinfo
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2021-06-10 20:46:25 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2021-06-12 19:31:17 +0000
commit090d4fba6a444590d850c697472e5fbcef46b0a4 (patch)
treecd2c70bfdf6549d962daaf266f4f2223cd4cc9a9 /examples/opengl/contextinfo
parent32222315eb32177d4161ee2e417d9910a07f6039 (diff)
examples: add screenshots to more modules
Adding screenshots and small documentation file to the modules - corelib - datavisualization - external - opengl - quick - sql - uitools - webchannel - webenginewidgets - some widgets - xml Renaming the widgets gallery due to name conflict with the quick controls gallery, and fixing two typos from contextinfo.py and hellogl2.py. Task-number: PYSIDE-841 Pick-to: 6.1 Change-Id: I2705e5d605fa738da0dca906cf6acb4b9d5d3dcd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/opengl/contextinfo')
-rw-r--r--examples/opengl/contextinfo/contextinfo.py12
-rw-r--r--examples/opengl/contextinfo/doc/contextinfo.pngbin0 -> 35022 bytes
-rw-r--r--examples/opengl/contextinfo/doc/contextinfo.rst10
3 files changed, 16 insertions, 6 deletions
diff --git a/examples/opengl/contextinfo/contextinfo.py b/examples/opengl/contextinfo/contextinfo.py
index 47fd83abc..73b55df13 100644
--- a/examples/opengl/contextinfo/contextinfo.py
+++ b/examples/opengl/contextinfo/contextinfo.py
@@ -245,12 +245,12 @@ class RenderWindow(QWindow):
context_surface_format = print_surface_format(self.context.format())
surface_format = print_surface_format(self.format())
- text = ("Vendor: {gl_vendor}\n"
- "Renderer: {gl_renderer}\n"
- "Version: {gl_version}\n"
- "Shading language: {gl_lang_version}\n"
- "Context Format: {context_surface_format}\n\n"
- "Surface Format: {surface_format}")
+ text = (f"Vendor: {gl_vendor}\n"
+ f"Renderer: {gl_renderer}\n"
+ f"Version: {gl_version}\n"
+ f"Shading language: {gl_lang_version}\n"
+ f"Context Format: {context_surface_format}\n\n"
+ f"Surface Format: {surface_format}")
self.context.doneCurrent()
return text
diff --git a/examples/opengl/contextinfo/doc/contextinfo.png b/examples/opengl/contextinfo/doc/contextinfo.png
new file mode 100644
index 000000000..c7911f162
--- /dev/null
+++ b/examples/opengl/contextinfo/doc/contextinfo.png
Binary files differ
diff --git a/examples/opengl/contextinfo/doc/contextinfo.rst b/examples/opengl/contextinfo/doc/contextinfo.rst
new file mode 100644
index 000000000..1fa9eb42d
--- /dev/null
+++ b/examples/opengl/contextinfo/doc/contextinfo.rst
@@ -0,0 +1,10 @@
+Context Info Example
+====================
+
+The example shows the information about the OpenGL-related graphics
+configuration of the current system. This can be useful as a
+diagnostic tool.
+
+.. image:: contextinfo.png
+ :width: 400
+ :alt: Context Simple Screenshot