diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-04-27 15:10:17 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-04-28 13:21:27 +0200 |
| commit | 70d3268fc36656dc7f6168b90fc1e480f049dcca (patch) | |
| tree | 7342fa9a5263b27e2d37d8125898f456eddc357f /sources/pyside6/doc/developer | |
| parent | b2e6fabb78836c8f040ddddcce5353ae85b8b15a (diff) | |
example_gallery: Fix literalinclude for project files
Make it possible to reference code snippets from the example
by relative file names. This makes it possible to write tutorial
examples.
Pick-to: 6.5
Task-number: PYSIDE-1106
Change-Id: Ie95d69c3f98be239e210c9c32b8fc9fb484639f4
Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/doc/developer')
| -rw-r--r-- | sources/pyside6/doc/developer/add_port_example.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/pyside6/doc/developer/add_port_example.rst b/sources/pyside6/doc/developer/add_port_example.rst index d599e50bf..6182d26c1 100644 --- a/sources/pyside6/doc/developer/add_port_example.rst +++ b/sources/pyside6/doc/developer/add_port_example.rst @@ -37,6 +37,13 @@ Add a new example - If you want the example to be automatically displayed on the example gallery, include a ``doc`` directory that contains a ``rst`` file and a screenshot. Check other examples for formatting questions. +- When writing the ``rst`` file, you can include code snippets using + the ``literalinclude`` directive specifying the relative path + as listed in the ``.pyproject`` file. The `example_gallery` tool will + expand this (see the `pointconfiguration` example). +- For the code displayed in the tabs, you can create ``rstinc`` files + in the ``doc`` directory containing some description explaining them + (see the `samplebinding` example). Port a Qt example ----------------- |
