@davidfor: The PyQt5.Qt module was a shortcut module for importing other Qt classes from a common namespace that was removed in PyQt6. It should not be used and and definitely not aliased as QtGui which is a different module altogether.
Indeed, from calibre 5.13 onwards you can simply do all Qt related imports as
from qt.core import whatever
It works on qt 5 and qt 6. This is what is used in calibre source code itself.
@jhowell: Yes, QTextEdit is rather too specialised for me too add a compat layer for it. Ans yes, the fully qualified names work with calibre 5.x as well. Not sure about even earlier versions though.
|