04-05-2023, 03:42 PM | #1 |
Guru
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
QWebEngineView
Hi
In one of my plugins, I'm using QWebEngineView as a way to show a HTML/CSS graph, using flexbox. It works just fine on calibre 6, but I had a hard time trying to make it work on older versions. If I remember correctly, calibre 4 and 5 have QWebEngineView, but you need to run it on a diferent process, and this leaded to crashes here (certainly something wrong I did). First, I would like to know if there is another alternative to QWebEngineView that could work on calibre 4+, in a general way. It is important to have full HTML/CSS support, otherwise flexbox won't work. Second, there is something bothering me with my current working code: the QDialog used to close when I pressed Esc; now, after adding the QWebEngineView widget, Esc doesn't work anymore... I have to click on the X. I tried overriding closeEvent or keyPressEvent but nothing worked. Any tips would be great! |
04-05-2023, 09:50 PM | #2 |
creator of calibre
Posts: 43,870
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No there are no alternatives to QWebEngineView that support full html/css. As for your escape issue, hard to say. Likely the web engine view is consuming the event. You can try installing an event filter.
|
Advert | |
|
04-06-2023, 06:53 AM | #3 | |
Guru
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
As for the ESC problem, I solved it by using setFocus() on another element. |
|
04-17-2023, 09:58 PM | #4 |
Custom User Title
Posts: 8,656
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Just curious: Is this something for Goodreads or some other website? The 'friends' makes me think so. (I'd love to see something like this but pulling from my custom columns.)
|
04-17-2023, 10:31 PM | #5 | |
Guru
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
P.S.: And out of curiosity too... you mean to create the graph based on your monthly reading statistics? |
|
Advert | |
|
04-18-2023, 01:39 AM | #6 |
Custom User Title
Posts: 8,656
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Yeah, something like that. Oh well
|
04-24-2023, 08:58 PM | #7 | |
Guru
Posts: 724
Karma: 228142
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
Quote:
If it worked with goodreads, I would make a donation Last edited by dunhill; 04-24-2023 at 09:02 PM. |
|
04-25-2023, 07:42 AM | #8 | |
Guru
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
But I was thinking about creating a standalone plugin just to control your Reading Goal. It would use your custom columns, like @ownedbycats suggested. It could use your data from Goodreads Sync (or you could just type it) to display the graph and other info (I don't think ranking is directly available by Goodreads Sync). |
|
04-25-2023, 08:32 PM | #9 | |
Guru
Posts: 724
Karma: 228142
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
Quote:
Last edited by dunhill; 04-25-2023 at 08:39 PM. |
|
08-22-2023, 10:47 AM | #10 | |
Guru
Posts: 930
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
|
|