<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Andrea,</p>
    <p>We're currently working on this question on QTribu
      (<a class="moz-txt-link-freetext" href="https://github.com/geotribu/qtribu/pull/186">https://github.com/geotribu/qtribu/pull/186</a>).</p>
    <p>
      <blockquote type="cite"><span
          style="font-family: Arial; font-size: small;">
          <div>What is the correct way to have users install the
            qtwebengine dependency?</div>
        </span></blockquote>
      On Debian and derived: <code class="notranslate">sudo apt install
        python3-pyqt5.qtwebengine</code></p>
    <p>On Windows, it seems that it's already included in the MSI
      package and standard QGIS installation with OSGeo4W.<code
        class="notranslate"><br>
      </code></p>
    <p>Hope it helps,<br>
      Julien<br>
    </p>
    <div class="moz-cite-prefix">Le 30/07/2024 à 11:29, Info O.GIS via
      QGIS-Developer a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:SHFJOH$C9007176CFEFAC359F6643EDAF4628C5@opengis.it">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <span style="font-family: Arial; font-size: small;"
        xam-editor-container="true">Good morning developers,
        <div>I managed to get qtwebengine working in qgis2web.</div>
        <div>For some reason qtwebkit didn't need to set a window width
          while qtwebengine did, so with this code I solved it</div>
        <div><br>
        </div>
        <div>
          <blockquote
            style="margin: 0 0 0 40px; border: none; padding: 0px;">
            <div>self.preview.setMinimumWidth(650)</div>
            <div><br>
            </div>
          </blockquote>
          <div><b>Request:</b></div>
          <div>What is the correct way to have users install the
            qtwebengine dependency?</div>
          <div>I wrote this code and it works fine but I only tested it
            on windows. Is this the correct way?</div>
        </div>
        <div><br>
        </div>
        <blockquote
          style="margin: 0 0 0 40px; border: none; padding: 0px;">
          <div>
            <div>
              <div style="">try:</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">        if system == 'Windows':</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">            pip_exec =
                os.path.join(sysconfig.get_path("scripts"), "pip3")</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">            env = os.environ.copy()</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">            if full_proxy_url:</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">                env['http_proxy'] =
                full_proxy_url</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">                env['https_proxy'] =
                full_proxy_url</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">            subprocess.check_call([pip_exec,
                "install", "--upgrade", "PyQtWebEngine==5.15.6"],
                env=env)</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">        elif system == 'Linux':</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">            subprocess.check_call(["sudo",
                "apt-get", "install", "python3-pyqt5.qtwebengine"])</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">        elif system == 'Darwin':  # macOS</div>
            </div>
          </div>
          <div>
            <div>
              <div style="">            subprocess.check_call(["brew",
                "install", "pyqt5"])</div>
            </div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Many thanks</div>
        <div><br>
          <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">
                                        <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">O.GIS - </font></span></b></span><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></div>
                                      </span></div>
                                  </span></div>
                              </div>
                            </span></span>
                        </div>
                      </span>
                    </div>
                  </span>
                </div>
              </span>
            </div>
          </div>
          <br>
          <br>
          <div class="xam-quoted-text xam-reply-text">
            <div
style="border-left: 3px solid #000000; padding-left: 10px;">
              <div><span
style="font-family:Arial; font-size:11px; color:#5F5F5F;">Da</span><span
style="font-family:Arial; font-size:12px; color:#5F5F5F; padding-left:5px;">
                  <a class="moz-txt-link-abbreviated" href="mailto:info@opengis.it">info@opengis.it</a></span></div>
              <div><span
style="font-family:Arial; font-size:11px; color:#5F5F5F;">A</span><span
style="font-family:Arial; font-size:12px; color:#5F5F5F; padding-left:5px;">
                  <a class="moz-txt-link-abbreviated" href="mailto:jan@dalheimer.de">jan@dalheimer.de</a></span></div>
              <div><span
style="font-family:Arial; font-size:11px; color:#5F5F5F;">Cc</span><span
style="font-family:Arial; font-size:12px; color:#5F5F5F; padding-left:5px;">
                  <a class="moz-txt-link-abbreviated" href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a></span></div>
              <div><span
style="font-family:Arial; font-size:11px; color:#5F5F5F;">Data</span><span
style="font-family:Arial; font-size:12px; color:#5F5F5F; padding-left:5px;">
                  Tue, 9 Jul 2024 17:46:39 +0200</span></div>
              <div><span
style="font-family:Arial; font-size:11px; color:#5F5F5F;">Oggetto</span><span
style="font-family:Arial; font-size:12px; color:#5F5F5F; padding-left:5px;">
                  Re: [QGIS-Developer] Transition from QtWebKit to
                  QtWebEngine in qgis2web (QGIS plugin)</span></div>
              <br>
              <span style="font-family: Arial; font-size: small;"
                xam-editor-container="true"><span
                  xam-editor-container="true">
                  <div>Thanks <span
style="background-color: rgb(255, 255, 255); font-family: Arial, sans-serif; font-size: 13px;">Jan
                      Dalheimer</span></div>
                  <div><span
style="background-color: rgb(255, 255, 255); font-family: Arial, sans-serif; font-size: 13px;">Thanks </span><span
style="background-color: rgb(255, 255, 255); font-family: Arial, sans-serif; font-size: 13px;">Jean-Baptiste
                      Peter</span></div>
                  <div><br>
                  </div>
                  <div>From your answers I understood many things.</div>
                  <div><br>
                  </div>
                  <div>I tried both to use QGIS 3.38.0 installed in
                    win10 via .msi and the version via OSGeo4W setup; In
                    the first case I added qtwebengine via "pip install
                    qtwebengine", in the second case I installed the
                    "python3-pyqtwebengine" package via OsGeo4w setup</div>
                  <div><br>
                  </div>
                  <div>In both installations I get the same result:
                    QtWebEngine it does not work well</div>
                  <div><br>
                  </div>
                  <div>I also tried to create a new test plugin and I
                    get the same result, I can't even view a web page.
                    Is there an example of a basic plugin that I can
                    see? Or can someone create it?</div>
                  <div><br>
                  </div>
                  <div><b>The clue:</b></div>
                  <div>
                    <div>If I use qt designer to insert a
                      QtWebEngineView into the plugin graphics it works
                      well, even when setting a static web page.</div>
                    <div>But if I open QGIS that plugin won't work, why
                      does this happen? I would therefore think that it
                      is just a question of <span
                        style="background-color: rgb(255, 255, 255);">dependency </span>.</div>
                  </div>
                  <div><br>
                  </div>
                  <div>
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">For
                      now I noticed this:</div>
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br>
                    </div>
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">1)
                      From QGIS version 3.38.0 I can use "from
                      qgis.PyQt.QtWebEngineWidgets import *" instead of
                      "from PyQt5.QtWebEngineWidgets import *"</div>
                  </div>
                </span>
                <blockquote
style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><span
                    xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br>
                    </div>
                  </span></blockquote>
                <span style="background-color: rgb(255, 255, 255);">2)
                  with qgis 3.38.0 .msi installation this dependency is
                  missing:</span><br>
                <blockquote
style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><span
                    xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br
style="outline: none; position: static !important;">
                    </div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">qt5-devel
                      (5.15.13-1)</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Qt5
                      headers and libraries (Development)</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Required
                      by: python3-pyqtwebengine</div>
                  </span></blockquote>
                <span xam-editor-container="true">
                  <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br
style="outline: none; position: static !important;">
                  </div>
                  <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br
style="outline: none; position: static !important;">
                  </div>
                  <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">3)
                    with OSGeo4W setup these dependencies are required:</div>
                  <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br
style="outline: none; position: static !important;">
                  </div>
                </span>
                <blockquote
style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><span
                    xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">python3-core
                      (3.12.4-1)</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Python
                      core interpreter and runtime</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Required
                      by: python3-pyqtwebengine, python3-pyqt5,
                      python3-pyqt5-sip</div>
                  </span></blockquote>
                <span xam-editor-container="true">
                  <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br
style="outline: none; position: static !important;">
                  </div>
                </span>
                <blockquote
style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><span
                    xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">python3-pyqt5
                      (5.15.10-1)</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Python
                      bindings for the Qt cross platform application
                      toolkit</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Required
                      by: python3-pyqtwebengine</div>
                  </span></blockquote>
                <span xam-editor-container="true">
                  <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br
style="outline: none; position: static !important;">
                  </div>
                </span>
                <blockquote
style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><span
                    xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">python3-pyqt5-sip
                      (12.13.0-1)</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">The
                      sip module support for PyQt5</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Required
                      by: python3-pyqtwebengine, python3-pyqt5</div>
                  </span></blockquote>
                <span xam-editor-container="true">
                  <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br
style="outline: none; position: static !important;">
                  </div>
                </span>
                <blockquote
style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><span
                    xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">qt5-devel
                      (5.15.13-1)</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Qt5
                      headers and libraries (Development)</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Required
                      by: python3-pyqtwebengine</div>
                  </span></blockquote>
                <span xam-editor-container="true">
                  <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;"><br
style="outline: none; position: static !important;">
                  </div>
                </span>
                <blockquote
style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><span
                    xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">qt5-libs
                      (5.15.13-1)</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Qt5
                      runtime libraries</div>
                  </span><span xam-editor-container="true">
                    <div
style="outline: none; background-color: rgb(255, 255, 255); position: static !important;">Required
                      by: python3-pyqtwebengine, python3-pyqt5,
                      qt5-devel, qtwebkit-libs</div>
                  </span></blockquote>
                <span xam-editor-container="true">
                  <div><span xam-editor-container="true"><br>
                    </span></div>
                  <div><span xam-editor-container="true">Thank you all</span></div>
                </span><br>
                <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">
                                              <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>
                <div class="xam-quoted-text xam-reply-text">
                  <div
style="border-left: 3px solid #000000; padding-left: 10px;">
                    <div id="x638ef51ea7d4462">
                      <blockquote
cite="SGAZSI$30D172754494A36ADC025D0FF69D7794@opengis.it" class="cite2"
                        type="cite"><span
                          style="font-family: Arial; font-size: small;"
                          xam-editor-container="true">
                          <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">
                                    </div>
                                  </span>
                                </div>
                              </span>
                            </div>
                          </div>
                        </span></blockquote>
                    </div>
                  </div>
                </div>
              </span></div>
          </div>
        </div>
      </span>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
    </blockquote>
    <div class="moz-signature">-- <br>
      <a
href="https://geotribu.fr/?utm_source=email&utm_campaign=signature_oslandia&utm_medium=email">Oslandia</a><a>
        - </a><a
href="https://geotribu.fr/?utm_source=email&utm_campaign=signature_oslandia&utm_medium=email"
        hreflang="fr">Geotribu</a><a></a></div>
  </body>
</html>