Skip to content

More PyQt6 aliases #31

Description

@chrisjbillington

PyQt6 dropped QApplication.exec_() in favour of exec(), but PySide6 still allows either exec_() or exec().

Earlier PyQt5 versions don't have exec() since they needed to work on Python 2 where exec is a Python keyword.

We should define exec() on PyQt5 if it's not there already, and exec_() on PyQt6, so that all of them work.

I'll leave this issue open to track any other aliases that come up testing labscript programs

@dihm FYI - you might notice labscript programs crashing in PyQt6 due to use of exec_(). Currently changing that to exec() will fix for PyQt6 but break for older PyQt5. Once we add aliases here, either spelling will work for all three Qt libs.

Edit:

  • QApplication/QDialog exec/exec() (added in 42fcc9e)

- [ ] QApplication.desktop missing in PySide6 and PyQt6, this is used in lyse. Looks like it was already deprecated in Qt5, so probably we should not add aliases for it and applications should move to whatever the newer thing is that's supported in Qt5 and Qt6 anyway. edit: already fixed by @dihm in lyse

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions