<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" dir="auto">
<span style="font-size: 12pt;">Hi</span><span style="font-size: 11pt;">,</span><br>
</div>
<div dir="auto" id="mail-editor-reference-message-container"><font size="2"><span style="font-size:11pt;">
<div class="PlainText" dir="auto"><br>
Following up on my previous post, I managed to get qwebengine to work within a plugin on windows 10. <br>
<br>
I had to do the following changes :</div>
<div class="PlainText" dir="auto"><br>
- On QGIS side, I had to change a line in the main.cpp from core to set "Qt::AA_ShareOpenGLContexts". I already posted a PR for this :<br>
<a href="https://github.com/qgis/QGIS/pull/47873">https://github.com/qgis/QGIS/pull/47873</a><br>
<br>
- I had to upgrade manually one of the dependency (python3-pyqt5-sip) to avoid the following error : “RuntimeError: the sip module implements API v12.0 to v12.8 but the PyQt5.QtCore module requires API v12.9”<br>
<br>
- Finally, on Pyqt side it was necessary to add an additional check during initialization to detect if "Qt::AA_ShareOpenGLContexts" has been set; I already reported the issue and this should be addressed in the next release.<br>
<br>
<span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); display: inline !important;">After doing these modifications, i</span>t works as expected in my environment. Would it be possible to apply these fixes in master?</div>
<div class="PlainText" dir="auto"><br>
</div>
<div class="PlainText" dir="auto">Best,<br>
<br>
Jean-Baptiste Peter<br>
<br>
<br>
----Original Message-----<br>
From: Nyall Dawson <nyall.dawson@gmail.com> <br>
Sent: Wednesday, February 16, 2022 1:57 AM<br>
To: Jean-Baptiste Peter <jbpeter@outlook.com><br>
Cc: qgis-developer@lists.osgeo.org<br>
Subject: Re: [QGIS-Developer] Recommended method to display a webpage in a plugin<br>
<br>
On Wed, 16 Feb 2022 at 06:46, Jean-Baptiste Peter <jbpeter@outlook.com> wrote:<br>
><br>
> Hello,<br>
><br>
> I am trying to figure what is the right way to display a webpage within a QGIS plugin and I have a few questions :<br>
><br>
> Is it currently possible to use QWebEngineView class with QGIS python console? When I try to import it in QGIS python console, I get the following error :<br>
><br>
><br>
><br>
> ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'<br>
><br>
><br>
><br>
><br>
><br>
> 2. If it is not currently possible to use QWebEngineView, does it involve major work or is there a chance it will be supported in the near future?<br>
<br>
It's a very messy, horrible situation with no good ways forward. Right now you'll need to use QtWebKit, and there's no plans on the horizon to change this.<br>
<br>
Nyall<br>
</div>
</span></font><br>
</div>
</body>
</html>