[Solved] Error: QtWebKit 3.0 module not found

  • Hi,

    I am currently writing an application in C++ which is supposed to load a qml file and show a WebView and I have an error when trying to import QtWebKit 3.0 in my qml file.

    file:///C:/DEVELOPMENT/myQml.qml:2:1: plugin cannot be loaded for module "QtWebKit": Cannot load library C:/DEVELOPMENT/QtWebKit/qmlwebkitplugin.dll: The specified module could not be found.
    import QtWebKit 3.0

    My setup is as follows:
    I have a C++ Application which uses QApplication and QQuickView to load a qml file
    QApplication app(argc, &argv);
    QQuickView view(QUrl::fromLocalFile("myQml.qml"));

    For the QML file I simply used the example from the "QT Webkit WebView":http://doc.qt.io/qt-5/qml-qtwebkit-webview.html
    import QtQuick 2.0
    import QtQuick.Controls 1.0
    import QtWebKit 3.0

    ScrollView {
    width: 1280
    height: 720
    WebView {
    id: webview
    url: "http://qt-project.org"
    anchors.fill: parent
    onNavigationRequested: {
    // detect URL scheme prefix, most likely an external link
    var schemaRE = /^\w+:/;
    if (schemaRE.test(request.url)) {
    request.action = WebView.AcceptRequest;
    } else {
    request.action = WebView.IgnoreRequest;
    // delegate request.url here

    The execution folder of the .exe file contains the subfolder QtWebKit as well as the subfolder QtQuick.2 where I thought the plugins are stored.
    When I tried to run an example using QtQuick 1.0 and QtWebKit 1.0 and the (deprecated ) QDeclarativeView it worked.

    I used the Qt Version 5.4 installation package for 64bit windows and opengl support and the plugins therein. I use Visual Studio 2013 to compile the C++ application.
    Does anyone have an idea where this could come from? Thanks in advance.

  • Hi folks,

    I figured the problem out myself and in case someone else encounters this problem, here is what worked for me:

    I ran dependency walker and only found dependencies on Core, Gui, QML, Quick and Widget (which I included in the folder of the executable).

    Apparently what was missing were dependencies for
    Multimedia, MultimediaWidget, Network, OpenGL, Positioning, PrintSupport, Sensors, Sql, WebChannel, WebKit, WebKitWidgets and the QtWebProcess.exe. I have no idea why this would be needed or why the error message did not say anything about it but it silently worked when adding these libraries to the folder of the executable. I followed these "deployment instructions":http://qt-project.org/wiki/Deploy_an_Application_on_Windows to figure out which libraries were necessary. Sadly I did not find any documentation about which modules have which dependencies so there is only the trial and error method described there.

    Best Regards,

Log in to reply