Unlucky-Life/ankimon

"About Anki" on Mac replaced with AnkiMon License

Closed this issue ยท 4 comments

@ylime0124 oh damn, didnt know about this ! Thx for the notice!

I may be wrong as I have not debugged on a Mac yet, adding .setMenuRole(QAction.MenuRole.NoRole) to QAction may help.
Previously such a Mac specific bug was solved that way. Like this.

#__init__.py 7324
test_action13 = QAction("About and License", mw)
test_action13.setMenuRole(QAction.MenuRole.NoRole) # add
test_action13.triggered.connect(license.show_window)
mw.pokemenu.addAction(test_action13)

๐ŸŸขEdit : I'll test this next time I debug on Mac, but I'm busy so it will be a while yet.

Done, I confirmed it works on Mac. Adding test_action13.setMenuRole(QAction.MenuRole.NoRole) will make "About Anki" work correctly.
Maybe the reason for this is the Mac automatically assigns the most frequently used menus to the app. MenuRole.NoRole will disable it.

@shigeyukey Thanks man great help !