Hi Andrea,We're currently working on this question on QTribu (https://github.com/geotribu/qtribu/pull/186).
What is the correct way to have users install the qtwebengine dependency?
On Debian and derived: |sudo apt install python3-pyqt5.qtwebengine|On Windows, it seems that it's already included in the MSI package and standard QGIS installation with OSGeo4W.|
| Hope it helps, Julien Le 30/07/2024 à 11:29, Info O.GIS via QGIS-Developer a écrit :
Good morning developers, I managed to get qtwebengine working in qgis2web.For some reason qtwebkit didn't need to set a window width while qtwebengine did, so with this code I solved itself.preview.setMinimumWidth(650) *Request:* What is the correct way to have users install the qtwebengine dependency?I wrote this code and it works fine but I only tested it on windows. Is this the correct way?try: if system == 'Windows': pip_exec = os.path.join(sysconfig.get_path("scripts"), "pip3") env = os.environ.copy() if full_proxy_url: env['http_proxy'] = full_proxy_url env['https_proxy'] = full_proxy_url subprocess.check_call([pip_exec, "install", "--upgrade", "PyQtWebEngine==5.15.6"], env=env) elif system == 'Linux': subprocess.check_call(["sudo", "apt-get", "install", "python3-pyqt5.qtwebengine"]) elif system == 'Darwin': # macOS subprocess.check_call(["brew", "install", "pyqt5"]) Many thanks *Andrea Ordonselli* *O.GIS - **opengis.it* dai...@opengis.it a...@dalheimer.de ccqgis-develo...@lists.osgeo.org DataTue, 9 Jul 2024 17:46:39 +0200OggettoRe: [QGIS-Developer] Transition from QtWebKit to QtWebEngine in qgis2web (QGIS plugin)Thanks Jan Dalheimer Thanks Jean-Baptiste Peter From your answers I understood many things.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 setupIn both installations I get the same result: QtWebEngine it does not work wellI 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?*The clue:*If I use qt designer to insert a QtWebEngineView into the plugin graphics it works well, even when setting a static web page. 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 dependency .For now I noticed this:1) From QGIS version 3.38.0 I can use "from qgis.PyQt.QtWebEngineWidgets import *" instead of "from PyQt5.QtWebEngineWidgets import *"2) with qgis 3.38.0 .msi installation this dependency is missing: qt5-devel (5.15.13-1) Qt5 headers and libraries (Development) Required by: python3-pyqtwebengine 3) with OSGeo4W setup these dependencies are required: python3-core (3.12.4-1) Python core interpreter and runtime Required by: python3-pyqtwebengine, python3-pyqt5, python3-pyqt5-sip python3-pyqt5 (5.15.10-1) Python bindings for the Qt cross platform application toolkit Required by: python3-pyqtwebengine python3-pyqt5-sip (12.13.0-1) The sip module support for PyQt5 Required by: python3-pyqtwebengine, python3-pyqt5 qt5-devel (5.15.13-1) Qt5 headers and libraries (Development) Required by: python3-pyqtwebengine qt5-libs (5.15.13-1) Qt5 runtime libraries Required by: python3-pyqtwebengine, python3-pyqt5, qt5-devel, qtwebkit-libs Thank you all *Andrea Ordonselli* *OpenGIS.it* _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer
--Oslandia <https://geotribu.fr/?utm_source=email&utm_campaign=signature_oslandia&utm_medium=email>- Geotribu <https://geotribu.fr/?utm_source=email&utm_campaign=signature_oslandia&utm_medium=email>
OpenPGP_0x5375CD81333F311E.asc
Description: OpenPGP public key
BEGIN:VCARD VERSION:4.0 N:Moura;Julien;;; FN:Julien Moura (Oslandia) NICKNAME:jmoura EMAIL;PREF=1;TYPE=work:julien.mo...@oslandia.com EMAIL:juli...@oslandia.com TZ:Europe/Paris URL;TYPE=work:https://oslandia.com/ URL:https://geotribu.fr/ ORG:Oslandia END:VCARD
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer