Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Creator cannot find Qt WebKit



  • Hy @all
    When I'm trying to start a project the QQmlApplicationEngine fails to load a component.
    My code of the qml file looks like this:

    import QtWebkit 3.0 //or 1.0
    
    WebView{
                id: webView
                anchors.top: buttons.bottom
                anchors.right: parent.right
                anchors.left: parent.left
                anchors.bottom: parent.bottom
    }
    

    But when I want to run my project, I get the following error:

    qrc:/main.qml:132 Type MainPage unavailable
    qrc:/MainPage.qml:152 Type OffersPage unavailable
    qrc:/OffersPage.qml:184 Type TabMarketingPreview unavailable
    qrc:/tabs/TabMarketingPreview.qml:2 module "QtWebKit" is not installed
    

    I've installed all tools in the installion guide and already tried to do it manually (see here)
    But it doesn't change a thing. Some help would be nice here.

    Specs: Ubuntu 16.04, Qt 5.7 (Android)



  • Does it work if you replace

    import QtWebkit 3.0
    

    with

    import QtWebView 1.0
    

  • Lifetime Qt Champion

    Hi,

    There's no QtWebKit module for Android. It's a platform restriction. You should rather use the QtWebView module.



  • thank you @mchinand and @SGaist, it works now. I would never have figured that out


  • Lifetime Qt Champion

    You're welcome !

    Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)


Log in to reply