无法使用硬件渲染运行最小Qt Quick WebEngine示例

Kevin_P 

 

我正在用Qt开始一个新项目,该项目的一部分将涉及使用QtWebEngine。我是Qt的新手,所以我试图点亮一个例子来修补 - 例如“WebEngine Qt Quick Minimal Example”。当在调试模式下运行示例时,使用最新版本的Qt全新安装(Qt Creator 4.6.0,Qt 5.10.1 / Qt 5.11和MSVC2017 64位),应用程序输出以下内容:Starting C:\Qt\Examples\Qt-5.11.0\webengine\build-minimal-Desktop_Qt_5_11_0_MSVC2017_64bit-Debug\debug\minimal.exe...
QML debugging is enabled. Only use this in a safe environment.
[2316:7748:0329/141148.989:ERROR:gl_surface_wgl.cc(372)] wglCreatePbufferARB not available.
[2316:7748:0329/141148.989:ERROR:gl_surface_wgl.cc(372)] wglCreatePbufferARB not available.
[2316:7748:0329/141148.989:ERROR:gl_surface_qt.cpp(751)] Requested OpenGL implementation is not supported. Implementation: 1
[2316:7748:0329/141148.989:ERROR:gl_surface_qt.cpp(751)] Requested OpenGL implementation is not supported. Implementation: 1
ASSERT failure in Q_UNREACHABLE(): "Q_UNREACHABLE was reached", file C:/Users/qt/work/qt/qtwebengine/src/core/gl_surface_qt.cpp, line 752

随之而来,会弹出以下错误消息:

但是,如果我告诉应用程序使用软件渲染通过 QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);,那么应用程序将工作并显示网页(如预期的那样)。我有点陷入困境,因为我无法想象我的GPU不支持它正在寻找的任何OpenGL实现(这一切都发生在具有两个NVIDIA GTX 1080的Windows 10 Pro 1709机器上 - 无论卡片如何都会出现错误是否处于SLI模式)。单击“忽略”按钮两次(我假设每张卡尝试一次)后,它会显示网页,但启用了软件渲染(即使我没有设置该属性)。在发布模式下,它只是在启动时崩溃。任何人都可以了解我应该研究什么来弄清楚为什么WebEngine不适合我的硬件渲染?

python: QCoreApplication.setAttribute(Qt.AA_UseSoftwareOpenGL,True)

猜你喜欢

转载自blog.csdn.net/ieeso/article/details/82181594