qtpy s a small abstraction layer that lets you write applications using a single API call to either PyQt or PySide. It aims at mimicking the Qt5 API, so this is a good first minimal step to transition to PyQt6 or PySide6 (with the added benefit that we now also support PySide2 for Qt5)
PyQt5 remains the default binding, so this does not change any behavior and is mostly (to the exception of some doc and requirements files) an automated replacement:
- PyQt5 -> qtpy
- pyqtSignal -> Signal
- pyqtProperty -> Property
- pyqtSlot -> Slot
- pyqtBoundSignal -> SignalInstance
This is a the minimal diff to make the code work with qtpy while still using PyQt5. In a following step we will make the necessary changes to be compatible also with PyQt6 and PySide6