Shiboken6 is a core component of Qt for Python (PySide6), responsible for generating Python bindings for C++ libraries. It enables seamless, low-level interaction between Python and C++ objects, allowing Python to call C++ functions and access C++ data structures directly. It is currently at version 6.11.0 and is actively maintained, with updates released in conjunction with PySide6 and Qt releases.
pip install shiboken6Verified import paths — ran on the pinned version, not inferred.
Shiboken6 is primarily used for low-level interaction between Python and C++ objects, specifically within the Qt/PySide ecosystem. This example demonstrates how to retrieve the underlying C++ pointer from a PySide6 QObject using `getCppPointer`. While `wrapInstance` is also a key function, its typical use involves receiving a raw C++ pointer from an external C++ source, which is difficult to simulate in a simple, self-contained Python snippet. Note that `PySide6` is a prerequisite to run this quickstart.
Update all `import shiboken` or `from shiboken import ...` statements to use `shiboken6` instead. For example, `from shiboken import wrapInstance` becomes `from shiboken6 import wrapInstance`.
Always explicitly define `ownership` when using `wrapInstance`. For C++-managed objects, use `ownership=shiboken6.Ownership.CppOwnership`. For objects where Python should take ownership and manage its lifecycle, use `ownership=shiboken6.Ownership.PythonOwnership`.
Ensure you understand the purpose of `shiboken6`. For standard GUI development, interact primarily with the PySide6 API. Reserve direct `shiboken6` usage for advanced scenarios involving raw C++ pointers or custom C++ extensions that integrate with PySide6.
No dependency data recorded yet.