<span style="font-family: Arial; font-size: small;" xam-editor-container="true"><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">Dear
QGIS Developers,<o:p></o:p></span></p><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">I
am currently maintaining the qgis2web plugin and am in the process of phasing
out QtWebKit due to its obsolescence and inability to handle modern code.<o:p></o:p></span></p><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">qgis2web
utilizes QtWebKit to display its export in a web preview window, which reads
the exported project comprising HTML, JS, and CSS files. Without updating
QtWebKit, I cannot update the third-party libraries used in the export (e.g.,
ol-geocoder, ol-layerswitcher, and many others).<o:p></o:p></span></p><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">I've
found numerous unresolved discussions about QtWebEngine online, but they
haven't helped me achieve my goal.<o:p></o:p></span></p><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">Here
is my current setup:<o:p></o:p></span></p><ul type="disc">
 <li class="MsoNormal" style="line-height: normal;"><span style="font-family: Arial, sans-serif;">Windows 10<o:p></o:p></span></li>
 <li class="MsoNormal" style="line-height: normal;"><span style="font-family: Arial, sans-serif;">Standard QGIS installation (not OSGeo4W), version: 3.36.3-Maidenhead<o:p></o:p></span></li>
 <li class="MsoNormal" style="line-height: normal;"><span style="font-family: Arial, sans-serif;">PyQt version: 5.15.10<o:p></o:p></span></li>
 <li class="MsoNormal" style="line-height: normal;"><span style="font-family: Arial, sans-serif;">Qt version: 5.15.13<o:p></o:p></span></li>
</ul><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">Progress
so far:<o:p></o:p></span></p><ol start="1" style="margin-top:0cm" type="1">
 <li class="MsoNormal" style="margin-top: 12pt; margin-bottom: 12pt; line-height: normal;"><span style="font-family: Arial, sans-serif;">Using "Qt Designer," dragging the "QWebEngineView"
     element into the plugin design causes the program to freeze. This issue is
     resolved after installing the dependency in the next step.<o:p></o:p></span></li>
 <li class="MsoNormal" style="margin-top: 12pt; margin-bottom: 12pt; line-height: normal;"><span style="font-family: Arial, sans-serif;">The standard installation via .msi lacks the QtWebEngine dependency,
     so I had to install it manually. This is a significant obstacle: I believe
     most QGIS users install the software on Windows using the .msi package, so
     I will need to provide a guide or come up with a solution for installation
     through the plugin itself. In any case, I installed the dependency by
     opening the "OSGeo4W Shell" and running the command:<br />
     <i><br />
     python -m pip install PyQtWebEngine<br />
     </i><br />
     Then, using<br />
     <i><br />
     pip list<br />
     </i><br />
     I confirmed the dependencies are now:<br />
     <i><br />
     PyQtWebEngine 5.15.6<br />
     PyQtWebEngine-Qt5 5.15.2</i><o:p></o:p></span></li>
 <li class="MsoNormal" style="margin-top: 12pt; margin-bottom: 12pt; line-height: normal;"><span style="font-family: Arial, sans-serif;">At this point, I was able to write the following Python code and
     receive a positive output<br />
     <i><br />
     try:<br />
         from PyQt5.QtWebEngineWidgets import QWebEngineView,
     QWebEngineProfile, QWebEnginePage, QWebEngineSettings<br />
         webengine_available = True<br />
         print("QtWebEngine available")<br />
     except ImportError as e:<br />
         webengine_available = False<br />
         print("QtWebEngine not available:", e)</i><o:p></o:p></span></li>
 <li class="MsoNormal" style="margin-top: 12pt; margin-bottom: 12pt; line-height: normal;"><span style="font-family: Arial, sans-serif;">In "Qt Designer" I can now add the
     "QWebEngineView" element without issues, and if I set a website
     manually by configuring the URL in the "QWebEngineView" section,
     it displays perfectly.<o:p></o:p></span></li>
</ol><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">Where
I am stuck:<o:p></o:p></span></p><ol start="1" type="1">
 <li class="MsoNormal" style="line-height: normal;"><span style="font-family: Arial, sans-serif;">Writing <i>from qgis.PyQt.QtWebEngineWidgets</i> results in an error.<o:p></o:p></span></li>
 <li class="MsoNormal" style="line-height: normal;"><span style="font-family: Arial, sans-serif;">Whether I add the "QWebEngineView" element manually in
     "Qt Designer" or via Python, the result is a completely blank
     plugin screen. The code I am testing for insertion is as follows:<br />
     <br />
     <i>if webengine_available:<br />
         print("WebEngine is available. Initializing
     QWebEngineView...")<br />
         widget = QWebEngineView()<br />
         self.preview = widget<br />
         try:<br />
            
     self.preview.setUrl(QUrl("https://opengis.it"))<br />
             print("Loading opengis.it in
     QWebEngineView.")<br />
         except Exception as e:<br />
             print("Failed to set URL:", e)<br />
     else:<br />
         print("WebEngine is not available. Initializing
     QTextBrowser...")<br />
         widget = QTextBrowser()<br />
         widget.setText(self.tr('Preview is not available since
     QtWebEngine dependency is missing on your system'))<br />
         print("QTextBrowser initialized with fallback
     message.")<br />
     <br />
     self.right_layout.insertWidget(0, widget)<br />
     print("Widget inserted into right_layout.")</i><o:p></o:p></span></li>
</ol><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">Questions:<o:p></o:p></span></p><ol start="1" style="margin-top:0cm" type="1">
 <li class="MsoNormal" style="margin-top: 12pt; margin-bottom: 12pt; line-height: normal;"><span style="font-family: Arial, sans-serif;">Since QtWebKit was deprecated in Qt 5.6, why does it still work in
     version 5.15.13?<o:p></o:p></span></li>
 <li class="MsoNormal" style="margin-top: 12pt; margin-bottom: 12pt; line-height: normal;"><span style="font-family: Arial, sans-serif;">Why isn't the QtWebEngine dependency included by default in the .msi
     installation?<o:p></o:p></span></li>
 <li class="MsoNormal" style="margin-top: 12pt; margin-bottom: 12pt; line-height: normal;"><span style="font-family: Arial, sans-serif;">Why doesn't <i>from qgis.PyQt.QtWebEngineWidgets</i> work?<o:p></o:p></span></li>
 <li class="MsoNormal" style="margin-top: 12pt; margin-bottom: 12pt; line-height: normal;"><span style="font-family: Arial, sans-serif;">Why is there a discrepancy between what I see and configure in
     "Qt Designer" and what appears when I run the plugin in QGIS
     (specifically, a completely blank screen)?<o:p></o:p></span></li>
</ol><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">Current
Status: <o:p></o:p></span></p><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">I
have no errors in the QGIS Python console, only positive prints, but I cannot
get past the blank plugin screen when launched in QGIS.<o:p></o:p></span></p><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">Thank
you all for your valuable work, which allows me to perform my beloved job.<o:p></o:p></span></p><p class="MsoNormal" style="margin-top:12.0pt;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm;line-height:normal"><span style="font-family: Arial, sans-serif;">Best
regards</span></p><div data-signature-id="1">
<div class="xam_msg_class">
<span style="font-family: Arial; font-size: small;" xam-editor-container="true"> 
<div class="xam_msg_class">
<span style="font-family: Arial; font-size: medium;" xam-editor-container="true"> 
<div class="xam_msg_class">
<span style="font-family: Arial;" xam-editor-container="true"><font size="2"> 
</font><div class="xam_msg_class" style=""><span style="font-family: Arial;" xam-editor-container="true"><span style="line-height: 115%; font-family: Calibri, sans-serif; color: rgb(0, 89, 179);"><span style="font-size: small;"><b>Andrea Ordonselli</b></span><br style="color: rgb(0, 0, 0); font-family: Arial; font-size: small;" /><div data-signature-id="1" style="color: rgb(0, 0, 0); font-family: Arial; font-size: small;"><div class="xam_msg_class"><span style="font-size: medium;" xam-editor-container="true"><div class="xam_msg_class"><span xam-editor-container="true"><font size="2"></font><div class="xam_msg_class"><span xam-editor-container="true"><b><span style="line-height: 18.4px; font-family: Calibri, sans-serif; color: rgb(0, 89, 179);"><font size="2">OpenGIS.it</font></span></b></span></div></span></div></span></div></div></span></span>
</div>
</span>
</div>
</span>
</div>
</span>
</div>
</div></span>