![]() |
#61 |
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 439
Karma: 145424
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. |
![]() |
![]() |
![]() |
#62 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,459
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, 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 | |
|
![]() |
#63 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,386
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@DNSB: Good catch. https://github.com/kovidgoyal/calibr...dc813a633f51ef
|
![]() |
![]() |
![]() |
#64 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,086
Karma: 60358908
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 |
![]() |
![]() |
![]() |
#65 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,622
Karma: 204624552
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 | |
|
![]() |
#66 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 183
Karma: 3587000
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. |
![]() |
![]() |
![]() |
#67 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,218
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
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. |
|
![]() |
![]() |
![]() |
#68 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,622
Karma: 204624552
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 ![]() |
![]() |
![]() |
![]() |
#69 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,622
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Obviously meant "qt.core"
![]() |
![]() |
![]() |
![]() |
#70 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
|
![]() |
![]() |
![]() |
#71 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,386
Karma: 27756918
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 |
![]() |
![]() |
![]() |
#72 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,386
Karma: 27756918
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
|
![]() |
![]() |
![]() |
#73 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,386
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
![]() |
![]() |
![]() |
#74 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
@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.
|
![]() |
![]() |
![]() |
#75 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,218
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |