-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Description
PyQt6 is available by default in Qubes 4.3. Theoretically we could also install PyQt5 there, but if we can spare dom0 from another dependency, that's a positive. Therefore we should make our current code work with both versions, at least while Qubes 4.2 is around.
Relevant PyQt5 → PyQt6 changes
They are practically all backwards compatible, but some are not forward compatible. In order words, PyQt6 is more stringent, but this should keep working on PyQt5. Here are some of the relevant changes to be adopted:
- replace "exec_()" with exec() (Qt5 targeted also python2, which meant that it had "exec" reserved. This is no longer the case, so we can use the more aptly named "exec()" (NOTE: check if this works on PyQt5, otherwise add a
try...except) - Expand enums like
QMessageBox.Okto have its full name:QMessageBox.StandardButtons.Ok
A good overview of the upgrade notes can be found at https://www.pythonguis.com/faq/pyqt5-vs-pyqt6/