Program crashes when play video with QWebView

444 views Asked by At

Here is the code

#include <QApplication>
#include <QtWebKitWidgets/QWebView>
int main(int argc, char * argv[])
{
    QApplication app(argc, argv);
    QWebView view;
    QCoreApplication::addLibraryPath("./plugins");
    view.settings()->setAttribute(QWebSettings::PluginsEnabled, true);
    // crash here
    view.load(QUrl("http://hon.qq.com/act/20140320video/Aluna.html"));
    // OK to show youtube
    //view.load(QUrl("http://www.youtube.com/watch?v=KMU0tzLwhbE"));
    view.show();
    return app.exec();
}

It crashes when play video on hon.qq.com, but works well playing video on Youtube.

0

There are 0 answers