QWebEngineView crashes on load() or page() method

本秂侑毒 提交于 2019-12-05 13:25:40

Problem solved. I was missing some key files required by QWebEngine, otherwise it'll crash. These files must be in the same directory as the executable. They are put there by the windeployqt.exe tool, so that's the best way to ensure your Qt application has everything it needs to run without crashing.

qtwebengine_resources.pak
qtwebengine_resources_100p
qtwebengine_resources_200p.pak.pak
QtWebEngineProcess.exe
icudtl.dat  

The reason this got me was our development group was formerly using Qt 4.8, and uses an in-house method to copy the required Qt dlls and whatnot into the target directory. When upgrading to Qt 5.x and adding QWebEngine, we didn't realize the files above were required.

You can set Windows environment variable called QTWEBENGINEPROCESS_PATH

Example:

QTWEBENGINEPROCESS_PATH C:\Qt\Qt5.6.0\5.6\msvc2013_64\bin\QtWebEngineProcess.exe

With this solution, no need to copy resources files into your projects output folders

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!