01-05-2022, 07:21 AM | #61 |
Chalut o/
Posts: 410
Karma: 145324
Join Date: Dec 2017
Device: Kobo
|
Okay, after some time, I just understood the compatibility of Qt.ItemFlag.
In fact, use the Qt.ItemFlags is a wrong usage, even in Qt5, the correcte usage and class is the 'simple' Qt.ItemFlag that actualy implemented. Well, All is done. And congrat for the work kovidgoyal. |
01-05-2022, 11:54 AM | #62 |
Bibliophagist
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I was modifying some of the conversion options and managed to get an error message when I tried to open the output options.
calibre, version 5.99.2 ERROR: Unhandled exception: <b>AttributeError</b>:'QPrinter' object has no attribute 'pageSize' Spoiler:
This happened after I set the Conversion => Common options => Page setup => Output Profile => tablet and all 4 margins to 0.0pt. After this, if I clicked on any of the 3 Conversion options, I got a rather messy popup. See attached image for that. Last edited by DNSB; 01-05-2022 at 12:01 PM. |
Advert | |
|
01-05-2022, 12:12 PM | #63 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@DNSB: Good catch. https://github.com/kovidgoyal/calibr...dc813a633f51ef
|
01-05-2022, 12:33 PM | #64 |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Review Downloaded Metadata
I just tried to use Review Download Metadata (results of using Ctrl-d)
Win10 x64 5.99.2 |
01-05-2022, 02:36 PM | #65 | |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm trying to get a handle on what all of my options are, here. So a few questions:
1) If I want to use the handy-dandy- Code:
from qt.core import yada Quote:
No criticism/judgement, here. I'm just making sure I understand all my options before making a decision about what to do. The easiest thing to do would be to forget everything that came before calibre 5.13. I just don't know if I'm ready to do that. I was hoping to support calibre 2.0+ on all systems. Even those with debundled python/qt that might have multiple PyQt versions installed like my Arch machine. Last edited by DiapDealer; 01-05-2022 at 03:03 PM. |
|
Advert | |
|
01-05-2022, 03:06 PM | #66 |
Groupie
Posts: 181
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
Not sure how it works on Arch, but couldn't you just check the Calibre version, then import QT5 for <= 5.x, and QT6 for >= 6? Instead of using a try-catch-block to detect QT5 vs QT6? Surely there's some kind of Calibre API to get the Calibre version? (EDIT: Like described in the next post).
Or, do "from qt.core import yada" in a try-except-block, and if that fails, it's Calibre 5 or older and you can import QT5. Last edited by Leseratte_10; 01-05-2022 at 03:22 PM. |
01-05-2022, 03:20 PM | #67 | |
Guru
Posts: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Maybe you could check for calibre version instead of Qt: Code:
from calibre.constants import numeric_version if numeric_version < (6, 0, 0): PyQt5 imports else: PyQt6 imports Last edited by thiago.eec; 01-05-2022 at 03:23 PM. |
|
01-05-2022, 03:50 PM | #68 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
All seems doable, thanks for the ideas! I may opt for something along the lines of:
Code:
from calibre.constants import numeric_version if numeric_version < (5, 13, 0): PyQt5 imports else: from qt.conf import yada |
01-05-2022, 05:43 PM | #69 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Obviously meant "qt.core"
|
01-05-2022, 08:47 PM | #70 |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
|
01-05-2022, 10:12 PM | #71 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@DiapDealer: You just need to do
Code:
try: from qt.core import whatever except ImportError: from PyQt5.Qt import whatever |
01-05-2022, 10:13 PM | #72 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@nqk: DPI is now entirely controlled by Qt. You can check your env vars. See https://doc.qt.io/qt-6/portingguide.html#high-dpi
|
01-05-2022, 10:24 PM | #73 | |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
01-06-2022, 06:58 AM | #74 |
Guru
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
|
@nqk: IMHO, this is not a problem with low resolution, but with Segoe UI Light hinting in Windows 10/11 which makes the font look too delicate. Change the default font to Segoe UI Normal and you will see that everything looks perfectly sharp.
|
01-06-2022, 11:51 AM | #75 |
Guru
Posts: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Just noticed a bug on Configure Metadata Download dialog: checkboxes changes are not being saved. Other changes get saved.
This also happens configuring individual sources. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suggestion for PI Devs | BetterRed | Plugins | 11 | 09-27-2020 06:18 PM |
Attn plugin devs: porting to python 3 | kovidgoyal | Plugins | 129 | 06-16-2020 01:31 AM |
Attention All Plugin Devs: Remove vestiges from python 2? | KevinH | Plugins | 11 | 05-29-2020 03:16 PM |
Plugin Devs: Should we include a License or COPYING file? | KevinH | Plugins | 3 | 08-15-2017 01:09 PM |
New Plugin Features in the upcoming Sigil 0.8.900 | KevinH | Plugins | 6 | 09-14-2015 02:48 PM |