Shiboken Wizard generates a typesystem XML file and a CMake file from a C++ library for generating Python bindings using the Shiboken bindings generator.
The process is:
| Name | Name for the bindings to be generated (Python module). |
| Output directory | The directory where to place the generated typesystem and CMake files. |
| Library | The C++ library (shared object or static library) for which to create bindings. |
| Headers | The headers containing the classes for which to create bindings. There are
two approaches:
|
When choosing Scan for Classes, the code parser scans the headers and displays the detected classes in the list on the right. For non-trivial cases, this will typically fail at first due to missing include paths. Those can be added in the bottom-left panel until parsing succeeds and a list of classes is displayed.
Tick the desired classes in the list on the right.
Use Generate (bottom/right) to create the typesystem XML file and a
CMakeLists.txt file into the previously specified output
directory.
After generating the files, the UI switches to the Build tab opens, which let's you edit the files and re-run the build, showing the log files informing about rejected members.
It is recommend to use the wizard with Qt Creator, particularly for building the bindings. It will then use the IDE as an editor and its build issues pane to display build errors.
To set this up, open the Options dialog, check the group box and specify a path to the Qt Creator executable.