在Windows10和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.如何解决?
发布于 2017-07-18 20:02:20
您运行的是哪个Windows版本?
mf.dll是Windows6/7/8/10的一部分(因此不能在Windows XP上运行)。如果您运行的是Windows XP,则必须使用配置选项"-target xp“配置Qt以使选项"-no-wmf-backend”与Windows XP兼容。
如果您运行的是现代版本,那么可以通过安装Windows Live Essentials和Media Feature Package来试用它
https://stackoverflow.com/questions/45162758
复制相似问题