-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Qt6 errors #82
base: main
Are you sure you want to change the base?
Fixed Qt6 errors #82
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Anki version 23.12.1, it fixes the error.
This fix reintroduces the same issue from #73 relating to full-screen |
@qaisarsulaiman Can you provide more detail. Which issue are you talking about? Do you mean #76, #70 or #60 (or a combination)? I would think that applying both PRs (namely this one and #73) shouldn't have any issues as they don't touch the same file, but I could be wrong. |
@49Indium Basically, prior to Qt6, applying the fullscreen change (https://github.com/Shirajuki/anki-redesign/pull/73/files) worked to stop every window opening in fullscreen. However, after Qt6, the changes described here had to be made to get the add-on to launch. However, after applying the changes described here, the fullscreen issue is back for me. I did not change |
@@ -8,7 +8,7 @@ | |||
from .utils.logger import logger | |||
|
|||
from typing import Any, Optional | |||
from PyQt5.QtWidgets import QWidget | |||
from aqt.qt import QWidget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we can ensure compatibility by using aqt.qt instead of PyQt6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, given that we fit with the new naming conventions of Qt6.
I am on version Version 24.04.1 (ccd9ca1a) using this addon from AnkiWeb and it still complains about Qt5.
Not sure what version is hosted on AnkiWeb. General Anki info:
|
@Speculate7348 Given that this PR is still not closed, I doubt that this is the version up on AnkiWeb. As this PR reintroduces the full-screen bug from #73, this PR will likely remain open for some time. I don't have a mac, and can't seem to reproduce the error, so I probably won't be able to fix this issue. If anyone else has a solution, feel free to add to this PR. |
Making the suggested change manually (using For me, the addon not loading at all is a greater issue than the a bug that does not affect the functionality of the addon. |
An import in
__init__.py
and some of the enums used inutils/dialog.py
use the PyQt5 bindings rather than the new PyQt6 versions (or theaqt
version arbitrary versions). As recently (October 2023 AFAIK) anki has started to only support Qt6 by default (as stated here), the import caused issues for the add-on on start up and the enums caused issues when accessing the settings menu (Tools > Anki-redesign).This should fix both #80 and #81. I know that @kvn1351 mentioned that they had a PR coming, but given that was 2 months ago, I thought I do the quick fixes suggested in #80.