Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Generating new bindings with PySide: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Generating new bindings with PySide generator tools=
[[Category:LanguageBindings::PySide::Shiboken]]
 
= 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.
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==
== 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|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|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|PySide_Binding_Generation_Tutorial]].


==Creating C++ bindings for languages other than Python==
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.


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|PySide_Binding_Generator]] is a front-end relying on [[PySide API Extractor|PySide_API_Extractor]], which is the tool that does the hard work of parsing the headers, reading the <span class="caps">XML</span> descriptions of language adaptations, merging the headers and descriptions together, and delivering processed data about the library to be wrapped for the target language.
If you are interested in experimenting with this, refer to the [[PySide_Binding_Generator]] page for a description of the binding generation functionality.


To create a new language binding generator, a new generator front-end needs to be written for [[PySide API Extractor|PySide_API_Extractor]]. The current [[PySide Binding Generator|PySide_Binding_Generator]] will be a good starting point.
The practical process of generating new bindings is described in [[PySide_Binding_Generation_Tutorial]].


===Categories:===
== Creating C++ bindings for languages other than Python ==


* [[:Category:LanguageBindings|LanguageBindings]]
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.
** [[:Category:LanguageBindings::PySide|PySide]]
* [[:Category:LanguageBindings::PySide::Shiboken|Shiboken]]

Revision as of 10:07, 24 February 2015


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.