简体   繁体   中英

Webview is not working in Qt Creator with mingw on Windows

I am using Qt creator 4.11.1 with Qt 5.14.1 and MinGW on Windows I have to open url in webview from QML I followed the below steps:

Added "QT += webkit" in pro file Included "import QtWebKit 1.0" in qml Added below code in same qml WebView { id: idWebview anchors.fill: parent url: "https://www.google.com/" }

It is build successfully but when I run the application getting " module "QtWebKit" is not installed " I tried "import QtWebView 1.0" instead of QtWebKit, getting " module "QtWebView" is not installed "

I have googled about this but didn't figure it out.

Please help me to resolve this issue.

Thank you so much in advance.

QWebView works only with msvc compiler on windows and clang for osx. mingw does not support it as of now.

If you have QT version more than 4.0 use webkitwidget instead of webkit in project file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM