Thread: QWebEngineView
View Single Post
Old 04-05-2023, 03:42 PM   #1
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,234
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
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!
Attached Thumbnails
Click image for larger version

Name:	2023-04-05.png
Views:	265
Size:	18.9 KB
ID:	200817  
thiago.eec is offline   Reply With Quote