[QGIS-Developer] PyQGIS problem with QWebEngineView / QtDesigner Crash with QWebEngineView

Roberto Benet rbenet71 at gmail.com
Mon Feb 8 12:56:53 PST 2021


Nyall, thank you very much for your help and interest.
The reason for using QWebEngine is I need to see the google earth page (https://earth.google.com/web/) and it asks for a more advanced version of browser and QWebkit does not support it.

One reflection I make is, QtDesigner by default comes without the QWevEngineWeb widget, however the one that comes with QGis does have this widget, therefore it is something that is expressly installed and that is why I think that if it does not work it is because it has not been installed well since from what I see folders / files are missing.

If I try to install version 12.5 of QWebEngine with Pip I imagine that it will not work because it will not be compatible with the Qt of Qgis.

Any idea how to fix it?

-----Mensaje original-----
De: Nyall Dawson <nyall.dawson at gmail.com> 
Enviado el: lunes, 8 de febrero de 2021 0:23
Para: Roberto Benet <rbenet71 at gmail.com>
CC: qgis-developer <qgis-developer at lists.osgeo.org>
Asunto: Re: [QGIS-Developer] PyQGIS problem with QWebEngineView / QtDesigner Crash with QWebEngineView

On Sat, 6 Feb 2021 at 18:28, Roberto Benet <rbenet71 at gmail.com> wrote:
>
> I have QGIS 3.16.3-Hannover installed with Qt 5.11.2 and 64-bit Windows 10. In two more computers I also have it installed in similar conditions.
>
>
>
> I am using the PyQGIS to stand-alone applications from QGIS and I think there is something that is not working well within PyQGIS because I cannot use the QWebEngineView and the QWebKit yes.

It's not a real answer to your question, but honestly I'd just stick with QWebkit if it's working. QGIS itself makes heavy use of these classes simply because QWebEngine is a very locked down API which doesn't give us any of the features we need. If you stick with QWebkit, things will work as expected because QGIS itself depends on it!

Blame Qt upstream for their poor decision making here -- they really dropped the ball with this whole QWebkit/webengine fiasco.

Nyall

>
>
>
> The symptoms I have are:
>
>
>
> 1.- If in the QtDesigner that is installed with QGIS, I add the QWebEngineView widget in the design, the program directly crash and stops running.
>
>
>
> 2.- If in a stand-alone application I start a QWebEngineView it gives me an error:
>
>
>
> Code:
>
>
>
>     from qgis.PyQt.QtWidgets import QWidget, QApplication, 
> QMainWindow, QFileDialog
>
>     from PyQt5.QtWebEngineWidgets import QWebEngineView
>
>
>
>     import sys
>
>
>
>     class temp (QWebEngineView):
>
>         def __init __ (self):
>
>             super () .__ init __ ()
>
>
>
>     if __name__ == '__main__':
>
>         # We create the instance of the created class and show the 
> window on the screen
>
>         app = QApplication (sys.argv)
>
>         win = temp ()
>
>         win.show ()
>
>         sys.exit (app.exec_ ())
>
>
>
> and the error it gives is:
>
> ```
>
> Qt WebEngine ICU data not found at C: /OSGeo4W64/apps/Qt5/resources.Trying parent directory ...
>
> Qt WebEngine ICU data not found at C: / OSGeo4W64 / apps / Qt5. Trying application directory ...
>
> Qt WebEngine ICU data not found at C: / OSGeo4W64 / apps / Python37. 
> Trying fallback directory ... The application MAY NOT work. Installed
>
> Qt WebEngine locales directory not found at location C: / OSGeo4W64 / apps / Qt5 / translationss \ qtwebengine_locales. Trying application directory ...
>
> Qt WebEngine locales directory not found at location C: / OSGeo4W64 / apps / Python37 \ qtwebengine_locales. Trying fallback directory ... Translations MAY NOT not be correct.
>
> [0205 / 214808.373: ERROR: icu_util.cc (179)] Invalid file descriptor 
> to
>
> ICU data received. [0205 / 214808.491: FATAL: icu_util.cc (311)] Check failed: result. Backtrace:
>
> ``
>
> I have looked at this link:
>
>
>
> https://issues.qgis.org/issues/18155
>
> 3 years ago it seems that this error could not be solved ...
>
>
>
> Then with this other:
>
>
>
> https://forum.qt.io/topic/70457/qt-5-7-qtwebenginewidgets-not-working-
> on-linux/3
>
>
>
> It seems that the following folders are missing, among others, that I do not have in my installation: resources, qtwebengine_locales, ...
>
>
>
> I have uninstalled the qwebengine with the OsGeo4W setup. And then I have reinstalled it.
>
>
>
> I have seen that QGis uses version 5.10.1, I have tried to install it through pip install, but it tells me that there is only the version from 5.12.
>
>
>
> I think it must be that the QWebEngineView is not installed correctly with QGIS. Because if that works if I use it with the installation of python38 or python39.
>
>
> Libre de virus. www.avg.com
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


-- 
Este correo electrónico ha sido comprobado en busca de virus por AVG.
http://www.avg.com



More information about the QGIS-Developer mailing list