ijgnd / anki__browser_side_by_side__horizontal_split

2 stars 1 forks source link

PyQt6 support: Use scoped enum access #7

Closed kleinerpirat closed 2 years ago

kleinerpirat commented 3 years ago

Prevents your add-on from breaking with Anki's upcoming PyQt6 support.

Issue

With PyQt6, Qt enums can only be accessed via scope. This access restriction will probably affect lots of your add-ons - here are the PyQt6 enums for reference: PyQt6.QtCore.Qt.

If someone creates a shim around this issue in time (https://github.com/ankitects/anki/pull/1406#issuecomment-934279415), this PR might not be neccessary - but it won't hurt either: PyQt5 < 5.11 (mid 2018) only supported unscoped enum access, but since your support starts with Anki 2.1.22 (2020), this PR will keep full backwards compatibility.

ijgnd commented 2 years ago

I know I'm too late ... Thanks for your help.