Python bindings for the Qt cross-platform application and UI framework
Actively maintained. Last release 5 weeks ago. A safe choice.
pip install pyside6PySide6
Introduction
Important: for Qt5 compatibility, check PySide2
PySide6 is the official Python module from the Qt for Python project, which provides access to the complete Qt 6.0+ framework.
The Qt for Python project is developed in the open, with all facilities you'd expect from any modern OSS project such as all code in a git repository and an open design process. We welcome any contribution conforming to the Qt Contribution Agreement.
Installation
It is possible to install via pip, both from Qt's servers
and PyPi:
pip install PySide6
Please note: this wheel is an alias to other two wheels PySide6_Essentials and PySide6_Addons, which contains a predefined list of Qt Modules.
Dependencies
PySide6 versions following 6.0 use a C++ parser based on Clang. The Clang library (C-bindings), is required for building. Prebuilt versions of it can be downloaded from download.qt.io.
After unpacking the archive, set the environment variable LLVM_INSTALL_DIR to point to the folder containing the include and lib directories of Clang:
7z x .../libclang-release_22.1.8-based-linux-Rhel9.6-gcc11.4-x86_64.7z
export LLVM_INSTALL_DIR=$PWD/libclang
On Windows:
7z x .../libclang-release_22.1.8-based-windows-vs2022_64.7z
SET LLVM_INSTALL_DIR=%CD%\libclang
Building from source
For building PySide6 from scratch, please read about Building from Source. This process will include getting the code:
git clone https://code.qt.io/pyside/pyside-setup
cd pyside-setup
git checkout 6.x # if a specific version is needed
then install the dependencies, and following the instructions per platform. A common build command will look like: