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
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]] 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. | |||
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.