View Single Post
Old 12-31-2021, 02:49 AM   #1
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,144
Karma: 27110892
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Plugin devs: Upcoming migration to Qt 6

calibre 6 (to be released in a few months), will be based on Qt 6. Qt 6 has various minor incompatibilities with Qt 5, many of which I have implemented compatibility layers for. However if your plugins use Qt then they need to be tested against Qt 6. Beta builds of calibre you can use for that purpose are available here: https://download.calibre-ebook.com/betas/

As of 5.99.3 the betas have support for proper icon themeing with support for using different icon themes for light and dark mode and calibre switches between them automatically. In order to use icons from themes that support your plugin you should pass the plugin name to the get_icons() function to load an icon. For example:

Code:
icon = get_icons('owp_sigil.png', 'Open With')
this will load the owp_sigil.png plugin from the users installed icon theme, if present, falling back to the image in the plugin zip file. Note that if you use kiwidude's code for loading icons, you will need to adjust it, as the way it loads themed icons will no longer work.

Notes about the betas:

1) 32 bit support is removed from calibre 6, because Qt 6 drops it. This means that if you use the windows MSI installer, it will uninstall existing calibre 32-bit and replace it with calibre 64-bit. calibre Portable is also now 64 bit.

2) calibre 6 has ARM support, the macOS build is now a universal binary with ARM and Intel and there is a Linux ARM64 build available as well.

Note that you dont need to change import statements as importing from PyQt5 automatically imports from PyQt6 instead when running calibre 6.

If in your testing you find some incompatibilities, do let me know and I will see if they can be patched in https://github.com/kovidgoyal/calibr...yqt6_compat.py

If you are running calibre from source, use the qt6 branch rather than master, with the Qt6 builds.

Last edited by kovidgoyal; 01-12-2022 at 09:49 AM.
kovidgoyal is offline   Reply With Quote