View Single Post
Old 09-21-2024, 08:48 AM   #17
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,699
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It might be a bit of work incorporating my plugin_utils module after the fact. It's main goal was to allow plugin devs to support both PyQt5 in Sigil pre-2.0 and PySide6 in Sigil post-2.0.But it does include a lot of stuff that makes it easier to match Sigil's palette, fonts and such. It uses a subclass of QApplication to make most of it fairly transparent. You'd definitely want to disable the automatic QTranslations stuff since you have your own translation mechanism in place. It defaults to being enabled, but most of the features are able to be easily enabled/disabled with optional parameters to the PluginApplication class.

It's entirely up to you. Use it wholesale, cherry-picked the parts you might want (like dark mode), or don't use it at all. I won't mind! There's plenty of people here (myself included) that can help you with using the module.

This all reminds me that I should create a newer, much leaner, version of my utility module that leaves out the PyQt5 support. We encourage folks to support older versions of Sigil wherever possible, but there does come a point where asking newer plugin devs to design their plugins with backward compatibility becomes overly complicated and self-defeating.

EDIT: And yes... compared to creating/using qrc resources in C++, PyQt/PySide's usage does seem to be a bit like sorcery!

Last edited by DiapDealer; 09-21-2024 at 09:06 AM.
DiapDealer is offline   Reply With Quote