Search code examples
c++qt5qwebengineview

How to include QwebEngineView without getting an error


Question is simple; I get an error "Unknown module QWebEngineView" when I write the line Qt += QWebEngineView in .pro file.

How to get rid of this ?
I have tried many solutions but still got the error when compiling. If you got a solution please explain it entirely step by step. I run Qt 5.10.1 with Ming32 5.30.


Solution

  • Try to use msys2 project that contains mingw64 with patches for qt5.

    Write in your .pro file

    QT += webenginewidgets
    

    Add

     #include <QWebEngineView>
    

    in file that will use QWebEngineView class