ThoreBor / Anki_Leaderboard

Anki 2.1 Add-On
https://ankiweb.net/shared/info/41708974
MIT License
52 stars 11 forks source link

Update for PyQt6 #167

Closed zjosua closed 2 years ago

zjosua commented 2 years ago

Starting from version 2.1.50, Anki uses PyQt6. Compatibility shims are provided, so there is no rush to make the add-on code compatible with PyQt6.

I have updated all the deprecated code I could find so far. Also, designer files should be built with pyuic6 (again, pyuic5 will work as long as compatibility shims are in place), which I made possible by changing the UI build script. It still uses pyuic5 by default.

I did not get the window icons to work.

Tested with Anki Version ⁨2.1.50 (2df3698e8)⁩ Python 3.9.7 Qt 6.2.2 PyQt 6.2.2 on Debian bookworm

ThoreBor commented 2 years ago

Thank you very much! Yes, I tested the add-on with the 2.1.50 beta a few weeks ago, and it seems like everything works for now. But it was on my to-do list, so thanks for doing it for me. I'll test this soon, it might take a while though.

I did not get the window icons to work.

It says here that pyrcc was removed in PyQt6. I'll look into it, but as long as everything else works, I'm happy.

ThoreBor commented 2 years ago

Thanks again!