KDDockWidgets API Documentation 1.7
|
These are the instructions for building the Python bindings for KDDockWidgets.
Currently unsupported:
Also, there are no plans to support the qmake buildsystem.
You will need:
Make sure you have PySide2, shiboken2 and shiboken2-generator installed. As this time, you cannot get shiboken2-generator because the wheels are not on PyPi. To use the wheels do this:
For more info visit https://doc.qt.io/qtforpython/shiboken2/gettingstarted.html
afterwards run:
Note the version must match the same Qt you intend to use when building KDDockWidgets.
Follow the same instructions as the previous section, except installing shiboken6 pyside6 shiboken6_generator
with pip.
Tell CMake to build the bindings by passing the ‘-DKDDockWidgets_PYTHON_BINDINGS=True’ option. Then run cmake --build
as usual.
The bindings will be installed to CMAKE_INSTALL_PREFIX
, which might require setting the PYTHONPATH
env variable to point to that path when running applications.
For example, if you install to the default location on linux you would:
Alternatively, configure the bindings install location by passing (for example) -DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=/usr/lib/python3.8/site-packages
to CMake and adjust to the PYTHONPATH accordingly, as necessary.
To run the KDDW python example
If you see errors like "Unable to locate Clang's built-in include directory" then first make sure you have llvm installed. If you still have problems try setting the environment variable LLVM_INSTALL_DIR
to point to your llvm installation.
Examples:
When building the examples you may encounter errors loading shared libraries from shiboken2_generator.
Try:
libclang.dll
that ship with QtForPython is not compatible with MSVC2019. To fix this, copy the libclang.dll
that comes with llvm into shiboken2, like so:cstdlib:145:9: error: no member named quick_exit
in the global namespace with XCode 15, try making the SDKROOT
env variable point to the XCode 14.2 SDK or download a more recent PySide6.