【问题标题】:Webview is not working in Qt Creator with mingw on WindowsWebview 在 Windows 上的 mingw 中无法在 Qt Creator 中工作
【发布时间】:2020-12-28 09:29:24
【问题描述】:

我在 Windows 上使用 Qt creator 4.11.1 和 Qt 5.14.1 和 MinGW 我必须从 QML 在 webview 中打开 url 我按照以下步骤操作:

在 pro 文件中添加了“QT += webkit” 在 qml 中包含“import QtWebKit 1.0” 在相同的 qml 中添加了以下代码 网络视图 { id: idWebview anchors.fill:父级 网址:“https://www.google.com/” }

它已成功构建,但是当我运行应用程序时,得到“module "QtWebKit" is not installed” 我试过“import QtWebView 1.0”而不是 QtWebKit,得到“module "QtWebView" is not installed

我在谷歌上搜索过,但没有弄明白。

请帮我解决这个问题。

非常感谢您。

【问题讨论】:

  • 所以也许它实际上并没有安装?您如何从 QtCreator 或作为独立应用程序运行该应用程序?
  • 我从 QtCreator 运行它

标签: c++ qt qml


【解决方案1】:

QWebView 仅适用于 windows 上的 msvc 编译器和适用于 osx 的 clang。 mingw 目前还不支持。

【讨论】:

    【解决方案2】:

    如果您的 QT 版本超过 4.0,请在项目文件中使用 webkitwidget 而不是 webkit。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-15
      • 2014-02-03
      • 2021-03-11
      • 1970-01-01
      • 2014-10-13
      • 2012-03-14
      相关资源
      最近更新 更多