QtWebEngineWidgets ERROR LNK2019

  • Hi, I'm new to Qt and for quite some time I've been trying to install Qt Creator so that I could use QtWebEngine. I'm working on a Windows 10 and have Visual Studio 2015 (with Update 3) installed. I downloaded Qt Creator 4.3.1, I have a blank template project that compiles and runs just fine. when I add

    QT       += core gui webenginewidgets

    in .pro file it still builds and runs but when I add

    #include <QtWebEngineWidgets/QtWebEngineWidgets>

    in main.cpp I get an error :

    main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool)" (__imp_??0QQmlDebuggingEnabler@@QEAA@_N@Z) referenced in function "void __cdecl `dynamic initializer for 'qQmlEnableDebuggingHelper''(void)" (??__EqQmlEnableDebuggingHelper@@YAXXZ)

    I'm using
    Microsoft Visual; c++ compiler 14.0 (amd64)
    compiler to complie my code.

    Any hints how to run Qt with QtWebEngine much appreciated.

    When I add

    #include <QtWebEngineWidgets>


    #include <QWebEngineSettings>

    instead of

    #include <QtWebEngineWidgets/QtWebEngineWidgets>

    I get a different error :

     error: C1083: Cannot open include file: 'QWebEngineSettings': No such file or directory

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of Qt are you currently using ?

  • Hi,

    Thanks for replying, I solved my issue. I was missing some "#include" in different files.

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.