![]() |
#181 |
Member
![]() Posts: 16
Karma: 10
Join Date: Dec 2015
Device: sigil
|
![]()
Hello everyone !
I want to use Qt5 instead of Tkinter in plugin but thats not working correctly. Any idea of doing this ? ![]() |
![]() |
![]() |
![]() |
#182 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,607
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
EDIT: I take that back. If you want to use an externally installed Python interpreter you can use whatever python gui framework you have at your disposal. But if you wanted to share your plugin, you'd have to instruct users how to set up their python environment to match yours. Last edited by DiapDealer; 01-18-2016 at 06:44 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#183 |
Member
![]() Posts: 16
Karma: 10
Join Date: Dec 2015
Device: sigil
|
We supposed that there is already PyQt5 installed on the client computer.
I've these files plugin.py and Formulaire.py. Can you help me please ? Thanks for answer. |
![]() |
![]() |
![]() |
#184 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,607
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If you already have PyQt5 installed (and you've verified that you can, in fact, do PyQt stuff outside of Sigil), then it should work. You just have to make sure you've unchecked "Use Bundled Python" in Sigil's Plugin Manager dialog, and configured your external Python interpreter.
|
![]() |
![]() |
![]() |
#185 | ||
Member
![]() Posts: 16
Karma: 10
Join Date: Dec 2015
Device: sigil
|
Quote:
Quote:
Any idea ? |
||
![]() |
![]() |
Advert | |
|
![]() |
#186 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,607
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Have you configured the correct Python interpreter? If PyQt is installed to work with Python3, then you need to make sure you've configured Sigil with the Python3 interpreter (or vice-versa). Also make sure the "engine" tag in the plugin.xml file has the correct PyQt-enabled entry (python34 or python27).
|
![]() |
![]() |
![]() |
#187 | |
Member
![]() Posts: 16
Karma: 10
Join Date: Dec 2015
Device: sigil
|
Quote:
![]() ![]() |
|
![]() |
![]() |
![]() |
#188 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,607
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm not near my computer right now, so everything I'm mentioning is off the top of my head. Let me check on this when I get home and make sure I'm not leading you astray on what is possible.
|
![]() |
![]() |
![]() |
#189 |
Member
![]() Posts: 16
Karma: 10
Join Date: Dec 2015
Device: sigil
|
Okay, let me know if you found some solution.
Now, It's work, the widget is working now ![]() ![]() PS : Can you help me to delete the post number #184 ? ![]() |
![]() |
![]() |
![]() |
#190 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,607
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'd rather not delete it. It may help someone in the future who's looking to do something similar.
|
![]() |
![]() |
![]() |
#191 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
![]() |
![]() |
![]() |
#192 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,607
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#193 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
JavaScript in the Preview window console
I've found out by chance that it's possible to run JavaScript code in the Preview console window.
Of course, since the read-only Preview window doesn't allow edits, you can only use it for temporary changes. For example, you can highlight certain words. You can test this with the following simple script, which will highlight all search terms. (BTW, only the first line is by me.) Spoiler:
(To display the console window, click Console in the grey menu bar below the Preview window; press Enter to run the code.) EDIT: This script doesn't work with all ePubs. With some ePubs you might get the following error: Code:
Error: SyntaxError: DOM Exception 12 ![]() If it doesn't work with your book, you can test it with Sigil_python_plugins.html from the Plugin Framework guide. Last edited by Doitsu; 01-09-2018 at 02:41 AM. |
![]() |
![]() |
![]() |
#194 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
Hi,
as far as i can see there is no method available in the API to just rename a file. I need to delete it and insert it again - but then its position is gone in the spine and i have to add id there again - in the right position. Did i miss something or is it so complicated? //rubeus PS thinking again deleting/adding is not an option (even if i would be able to handle the spine) as it will disrupt any other links pointing to this file. Last edited by rubeus; 01-24-2016 at 07:01 AM. |
![]() |
![]() |
![]() |
#195 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,805
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Renaming means having to do a universal update to find everything that points to it. That code exists in Sigil so renaming is best done inside Sigil itself and not in a plugin to prevent huge duplication of url/href/src and etc link updating code. The purpose of the plugin is to extend Sigil, not duplicate Sigil's functionality.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Loading Plugin in development | Sladd | Development | 6 | 06-17-2014 06:57 PM |
Question for plugin development gurus | DiapDealer | Plugins | 2 | 02-04-2012 11:33 PM |
DR800 Plugin development for DR800/DR1000 | yuri_b | iRex Developer's Corner | 0 | 09-18-2010 09:46 AM |
Device plugin development | reader42 | Plugins | 10 | 03-29-2010 12:39 PM |
Calibre plugin development - Newbie problems | minstrel | Plugins | 5 | 04-12-2009 12:44 PM |