简体   繁体   English

Webview 在 Qt Creator 中无法使用 Windows 上的 mingw

[英]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: 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/" } 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 "它构建成功但是当我运行应用程序得到“模块”QtWebKit“没有安装”我尝试“导入QtWebView 1.0”而不是QtWebKit,得到“模块“QtWebView”没有安装

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. QWebView 仅适用于 osx 的 windows 和 clang 上的 msvc 编译器。 mingw does not support it as of now. mingw 目前还不支持。

If you have QT version more than 4.0 use webkitwidget instead of webkit in project file.如果您的 QT 版本超过 4.0,请在项目文件中使用 webkitwidget 而不是 webkit。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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