Generating new bindings with PySide

From Qt Wiki
Revision as of 05:08, 5 June 2016 by AutoSpider (talk | contribs) (Change category "LanguageBindings::PySide::Shiboken" -> "PySide")
Jump to navigation Jump to search


Generating new bindings with PySide generator tools

PySide consists not only of Python Qt bindings, but also of a complete generator toolchain for rapidly generating completely new bindings of your own.

Creating bindings for C++ libraries

If you have a library built on top of Qt or not and want to make it available on Python, then check out the PySide_Binding_Generator page on how to write type system files to export it, generate the source code and build the binaries. Keep in mind that if the wrapped library depends on Qt, then this new binding will depend on PySide as well as on Qt.

If you are interested in experimenting with this, refer to the PySide_Binding_Generator page for a description of the binding generation functionality.

The practical process of generating new bindings is described in PySide_Binding_Generation_Tutorial.

Creating C++ bindings for languages other than Python

It would be possible to adapt the PySide binding generation methodology to generate bindings for any high-level language by adapting the tools in the PySide generation toolchain. PySide_Binding_Generator is a front-end relying on PySide_API_Extractor, which is the tool that does the hard work of parsing the headers, reading the XML descriptions of language adaptations, merging the headers and descriptions together, and delivering processed data about the library to be wrapped for the target language.