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.