0

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.

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 python 39.

RBenet
  • 171
  • 1
  • 10
  • you may have to install pyqtwebengine of the same version as PyQgis: `python -m pip install pyqtwebengine==5.11.2` – eyllanesc Feb 05 '21 at 21:58
  • Thank you, I did it, and I have this error : ERROR: Could not find a version that satisfies the requirement pyqtwebengine==5.11.2 (from versions: 5.12, 5.12.1, 5.13.0, 5.13.1, 5.13.2, 5.14.0, 5.15.0, 5.15.1, 5.15.2) ERROR: No matching distribution found for pyqtwebengine==5.11.2 – RBenet Feb 05 '21 at 22:04
  • So the conclusion is clear: If you want to use pyqtwebengine then you should get a version of PyQgis that uses a more updated Qt – eyllanesc Feb 05 '21 at 22:06

0 Answers0