是什么导致 "Could not find QtWebEngineProcess" 错误?

What leads to "Could not find QtWebEngineProcess" error?

我正在尝试将 WebKit (Qt5.5.1) 插件移植到 WebEngine (Qt5.11.3),如下所述:https://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html 在 Ubuntu 18.04 中构建和 运行 我收到以下错误:

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

然后

Could not find QtWebEngineProcess

我不确定第一个是否与第二个有关,但第二个会导致崩溃。

编辑: 我将 QtWebEngineProcess 从 Qt/libexec 目录放到二进制目录,现在第二个错误更改为:

WebEngineContext used before initialize() or OpenGL context creation failed.

仍然崩溃。

问题出在缺少依赖文件中。

我们的 cmake 构建仅将 auto-determined 依赖项(库)从 Qt 文件夹复制到应用程序文件夹。但是要完全部署 QtWebEngine 应用程序需要很少的 non-libs 依赖项,例如 QtWebEngineProcess 可执行文件 xcbglintegrations 插件(第一个错误)和 WebEngine 资源。此说明 https://doc.qt.io/qt-5/qtwebengine-deploying.html 包含大部分详细信息。

它适用于 Qt5.12.9。使用 Qt5.11.3 我仍然遇到了一些问题。