![]() |
#16 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#17 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 800000
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1|PW3|PW4), Kindle Voyage
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#18 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#19 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
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 So the fix shall go to this function, replacing the import Code:
from PySide6.QtWidgets import QApplication, QWidget, QFileDialog To test any new code we will have to remove the line with Code:
"magick_exe_path" Just my 2 cents |
|
![]() |
![]() |
![]() |
#20 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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(): .... |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |