Windows 10和Qt Creator MSVC2015_64,我编译并运行QWebEngineView的示例。就像这样:
#include "mainwindow.h"
#include <QApplication>
#include <QWebEngineView>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWebEngineView *view = new QWebEngineView();
view->load(QUrl("http://qt-project.org/"));
view->show();
return a.exec();
}
但是这段代码无法显示视图,它会给出一些消息:
[2460:3120:0718/170222.823:INFO:dxva_video_decode_accelerator_win.cc(1120)] mf.dll is required for hardware video decoding
[2460:3120:0718/170222.823:INFO:dxva_video_decode_accelerator_win.cc(1120)] mf.dll is required for hardware video decoding
[2460:3120:0718/170223.229:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[2460:3120:0718/170223.229:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
如何解决?
答案 0 :(得分:0)
您正在运行哪个Windows版本?
mf.dll是Windows 6/7/8/10的一部分(因此无法在Windows XP上运行)。如果您运行的是Windows XP,则必须使用配置选项&#34; -target xp&#34;来配置Qt。选项&#34; -no-wmf-backend&#34;与Windows XP兼容。
如果您运行的是现代版本,请先安装Windows Live Essentials和Media Feature Package
进行尝试