QtWebEngine: No such file or directory
-
Neither the forum search nor Google turned up anything on this.
I'm trying to use QtWebEngine in a QML program, all the latest versions, Windows 7, MSVC-2017 compiler. I checked the WebEngine item when I installed Qt Creator. Here's what I've done in my code:
- Added
webengine
to theQT
variable in the project file. - Added
import QtWebEngine 1.7
to the QML file. - Added
#include <QtWebEngine>
to the main.cpp file. - Added
QtWebEngine::initialize();
to the main function, after creating the app.
I get
C1083: Cannot open include file: 'QtWebEngine': No such file or directory
.All of the above was per the instructions in the current QtWebEngine documentation. Then I tried the example WebEngine Quick Nano Browser, and it works fine.
So what's the difference? It uses an earlier version of QtWebEngine, but I'm not getting far enough for that to matter. I found that its main.cpp says
#include <QtWebEngine/qtwebengineglobal.h>
. So I changed my application to include that. Now it compiles, but I get a link error on theQtWebEngine::initialize()
function.But I still can't see any explanation why the
quicknanobrowser
project should find theinitialize
function but my project doesn't. Any ideas? - Added