Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-04-2025, 06:20 PM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,732
Karma: 5703586
Join Date: Nov 2009
Device: many
The official gui for Sigil under Qt6 is not PyQt6 but instead Qt's official PySide6. DiapDealer has created a plugin_utils.py module to make supporting PyQt5 and PySide6 easily done. He also has a plugib_utils_light.py module for use with Sigil 2.0.0 or later versions of Sigil.

Integrating one of those two modules into this plugin would definitely be useful to others.
KevinH is offline   Reply With Quote
Old 06-16-2025, 02:55 AM   #17
LostOnTheLine
Connoisseur
LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.
 
Posts: 72
Karma: 800000
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1|PW3|PW4), Kindle Voyage
Quote:
Originally Posted by KevinH View Post
The official gui for Sigil under Qt6 is not PyQt6 but instead Qt's official PySide6. DiapDealer has created a plugin_utils.py module to make supporting PyQt5 and PySide6 easily done. He also has a plugib_utils_light.py module for use with Sigil 2.0.0 or later versions of Sigil.

Integrating one of those two modules into this plugin would definitely be useful to others.
Cool. Thanks for that. Is there one that would be better than the other? I'll edit to incorporate whichever is best. As I said, I'm not a coder, so I'll be fiddling around to get it to work so any information on what needs to be imported to start with would be a big help.

I'm currently using Sigil Version: 2.5.2 with Loaded Qt: 6.8.2 & the plugin seems to work without issue on my end as is, but I'll happily update it to a newer version so that it will work better for others as well as myself & to prevent interruptions when there are future changes.
LostOnTheLine is offline   Reply With Quote
Old 06-17-2025, 01:05 PM   #18
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,732
Karma: 5703586
Join Date: Nov 2009
Device: many
Since Sigil moved to Qt6, we only support PySide6 on Windows and Mac, and now for Linux AppImage. The plugin_util.py file created by DiapDealer also supports PyQt5 for those Linux users stuck with only Qt5.

So if you want your plugin to work well on Windows, Mac, and the Linux AppImage using the embedded Python use PySide6 not PyQt6.
KevinH is offline   Reply With Quote
Old 06-18-2025, 03:45 PM   #19
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by LostOnTheLine View Post
....
I'm currently using Sigil Version: 2.5.2 with Loaded Qt: 6.8.2 & the plugin seems to work without issue on my end as is, but I'll happily update it to a newer version so that it will work better for others as well as myself & to prevent interruptions when there are future changes.
Same here, we've already set the path to the imageMagick executable and
Code:
#------------------------------------
# display ImageMagick file selection dialog
#------------------------------------
def GetFileName():
    ''' displays the ImageMagick file selection dialog '''
    # requires Sigil 0.9.8 or higher or PyQt6/PySide6
    home = expanduser('~')
    from PySide6.QtWidgets import QApplication, QWidget, QFileDialog
    app = QApplication(sys.argv)
    w = QWidget()
    file_path, filter = QFileDialog.getOpenFileName(w,'Select ImageMagick exe-file', home, 'ImageMagick-Executable (magick.exe)')
   
    return file_path
is, as I read the code, the only place relying on the GUI. And this part is, after the initial run, never called again.

So the fix shall go to this function, replacing the import
Code:
from PySide6.QtWidgets import QApplication, QWidget, QFileDialog
with some from the helper modules. - But still not sure how to do it.

To test any new code we will have to remove the line with
Code:
"magick_exe_path"
from the ImgShrinker.json configuration-file

Just my 2 cents
Mark Nord is offline   Reply With Quote
Old 06-26-2025, 11:35 AM   #20
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Just updated Post #1 with version 0.0.4
Many thanks to Doitsu for his help and suggestions.

The GetFileName-Dialog is realized with imports from plugin_utils.py
relevant code:
Code:
    #--------------------------------------
    # file selection dialog
    # Code courtesy of Doitsu / KindleGenQt
    #--------------------------------------
    def GetFileName():
        ''' simple file selection dialog box '''
        fpath = None
        if not PluginApplication.instance():
            app = PluginApplication(sys.argv, bk)
        else:
            app = PluginApplication.instance()
        dlg = QtWidgets.QFileDialog()
        .....
        if dlg.exec():
        ....
Mark Nord is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] ACE - DAISY EPUB Accessibility Checker wrapper Doitsu Plugins 37 07-15-2024 11:38 AM
ImageMagick for 2.5.8 DXG anyone? _spacemonkey Kindle Developer's Corner 11 12-08-2018 09:15 PM
Aura Any tutorial to install ImageMagick alexyung Kobo Developer's Corner 7 10-16-2017 02:08 PM
Change "Remove ImageMagick" Breaks Generate Cover Plugin JimmXinu Development 6 05-13-2016 12:07 AM
[Plugin] CSSLint - Simple CSSLint wrapper Doitsu Plugins 1 03-23-2016 06:51 PM


All times are GMT -4. The time now is 04:07 AM.


MobileRead.com is a privately owned, operated and funded community.