Quote:
Originally Posted by carmenchu
As the Sigil_Plugin_Framework_rev12.epub lacks information on GUIs, please:
- For my needs, would Tkinter or PyQt5 be the simpler approach?
- Can some-helpful-body provide a very simple template (no bell or whistles) working in Sigil?
|
The plugin framework provides no extensions/improvements to python gui functionality, hence the reason there's no information provided in the Plugin Framework documentation. I'm sure some will be able to offer help in constructing guis with python using tkinter or pyqt5, but it's beyond the scope of our plugin framework guide. There are plenty of tutorials/examples available online for making tkinter and pyqt5 dialogs, and there are plenty of examples of integrating such dialogs with Sigil plugins in many of the available Sigil plugins.
"Simpler" is in the eye of the beholder. I've done a lot of tkinter guis for my various plugins, but I've always found tkinter to be terribly unintuitive for some reason. I'm not sure why; it might just be me. One advantage PyQt has is that the gui will match Sigil's gui style, and the plugin framework even offers ways to ensure that the plugin's dialogs will match Sigil's lightmode/darkmode user preference. Tkinter will only automatically do that on macOS (with newer versions of macOS). My plugins with GUI's will eventually all use PyQt5 instead of tkinter.