View Single Post
Old 01-05-2022, 03:06 PM   #66
Leseratte_10
Groupie
Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.
 
Posts: 183
Karma: 3587000
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
Not sure how it works on Arch, but couldn't you just check the Calibre version, then import QT5 for <= 5.x, and QT6 for >= 6? Instead of using a try-catch-block to detect QT5 vs QT6? Surely there's some kind of Calibre API to get the Calibre version? (EDIT: Like described in the next post).

Or, do "from qt.core import yada" in a try-except-block, and if that fails, it's Calibre 5 or older and you can import QT5.

Last edited by Leseratte_10; 01-05-2022 at 03:22 PM.
Leseratte_10 is offline   Reply With Quote