A Python abstraction layer for writing Qt applications that work with PyQt5, PySide2, PyQt6, and PySide6 using a single codebase.
QtPy is a Python abstraction layer that provides a uniform API for developing Qt applications, compatible with PyQt5, PySide2, PyQt6, and PySide6. It solves the problem of maintaining separate codebases when targeting different Qt bindings or migrating between Qt versions, allowing developers to write once and run across multiple Qt implementations.
Python developers building desktop GUI applications with Qt who need to support multiple Qt bindings (PyQt/PySide) or migrate between Qt5 and Qt6 without extensive code changes.
Developers choose QtPy because it dramatically reduces the complexity and maintenance burden of supporting multiple Qt backends, enabling incremental upgrades and ensuring long-term compatibility with a minimal, dependency-free abstraction layer.
Provides an uniform layer to support PyQt5, PySide2, PyQt6, PySide6 with a single codebase
Enables writing code once for PyQt5, PySide2, PyQt6, and PySide6 by importing from qtpy, eliminating duplicate codebases as highlighted in the Key Features.
Facilitates gradual porting between Qt versions or bindings without full rewrites, with QtPy handling incompatibilities internally per the README's seamless transition feature.
Allows binding selection via the QT_API environment variable (e.g., set to 'pyside6'), with PyQt5 as a default fallback for easy deployment configuration.
Provides CLI tools (qtpy mypy-args, qtpy pyright-config) to generate configurations for MyPy and Pyright/Pylance, ensuring static analysis works with dynamic binding selection.
QtPy doesn't install any Qt binding itself; users must manually install PyQt or PySide, adding setup steps and potential version dependency conflicts.
Abstraction may not fully encapsulate all binding-specific features or newer Qt modules, requiring fallback to direct imports for edge cases, as hinted by the compat module's focused wrappers.
Type checker integration requires running CLI commands or editing config files (e.g., pyrightconfig.json), which adds complexity compared to native binding setups.
The Pencil Project's unique mission is to build a free and opensource tool for making diagrams and GUI prototyping that everyone can use.
Elements C++ GUI library
A Wayland kiosk
Easy-to-use Raspberry Pi image for booting directly into full-screen Chrome, with built-in convenience features for unattended operation. Perfect for dashboards and build monitors.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.