diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-10-17 11:20:44 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-10-22 10:33:13 +0000 |
commit | 3d6fc64570024d6af11597bb2ee4d431600ec6e1 (patch) | |
tree | 5be94b0f37fc50d92d5510b2646a1618f1a44860 /README.shiboken2-generator.md | |
parent | f595aa5d9d45bc772d2e9aea24f44dc5d43c45be (diff) |
Update README files for the project
After the split related to building the project
three README files are required to describe each component:
PySide2, Shiboken2-Generator and Shiboken2 (module).
For PySide2 and Shiboken2 (module) the README will also
be the project description on PyPi.
Change-Id: I3a2c3fe7fcfdbef696ffe77d5f1e6ba34f9f9b23
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'README.shiboken2-generator.md')
-rw-r--r-- | README.shiboken2-generator.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/README.shiboken2-generator.md b/README.shiboken2-generator.md index c71c6a8de..f29f40634 100644 --- a/README.shiboken2-generator.md +++ b/README.shiboken2-generator.md @@ -1 +1,37 @@ # shiboken2-generator + +Shiboken is the generator used by the Qt for Python project. +It outputs C++ code for CPython extensions, which can be compiled +and transformed into a Python module. + +C++ projects based on Qt can be wrapped, but also projects +which are not related to Qt. + +## How does it work? + +Shiboken uses an API Extractor that does most of the job, +but it requires a typesystem (XML file) to customize how the +C++ classes/methods will be exposed to Python. + +The typesystem allows you to remove arguments from signatures, +modify return types, inject code and add conversion rules +from the C++ data types to Python data types, manipulate +the ownership of the objects, etc. + +# Examples + +An example related to wrap a C++ library not depending on Qt +can be found in our [repository](https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/samplebinding). + +Additionally, you can find a couple of tests inside the +[git repository](https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/shiboken2/tests). + +For a more advanced case regarding extending a Qt/C++ application +with Python bindings based on the idea of the PySide module, +you can check the [scriptableapplication](https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/scriptableapplication) +example in our repository. + +# Documentation + +You can find more information about Shiboken in our +[official documentation page](https://doc.qt.io/qtforpython/shiboken2/). |