移动端的 Qt WebKit [英] Qt WebKit On Mobile

查看:18
本文介绍了移动端的 Qt WebKit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试呈现网页.Qt 表示他们的 QtWebKit 从 4.8 版开始可用于移动设备这里

I am trying to render a web page. Qt says their QtWebKit is available for mobile since 4.8 here

如果你想定位移动设备,你应该考虑使用 QGraphicsWebView 而不是 QWebView.

If you want to target mobile devices you should consider using QGraphicsWebView instead of QWebView.

它们都在 QtWebKit 下.那么我错过了什么?

Both of them is under QtWebKit. So what am I missing?

推荐答案

如果您在谈论 Android 和 iOS,那只是一个禁忌.从 Qt 5.2 的发布页面引用 Digia:

If you are talking about Android and iOS, it's just a no-no. Citing Digia from the release page of Qt 5.2:

Qt Webkit 在 Android不支持,我们正在努力提供跨平台 API 以将网络内容集成到移动应用程序中.如果您想将 Web 内容合并到 Qt 应用程序中,则需要使用本机 Web 组件.为了更轻松地与原生内容交互,我们提供了 Qt Android Extras 模块JNI 便捷 API.

Qt Webkit is not supported on Android and we are working on providing a cross-platform API to integrate web content into mobile apps. If you you would like to incorporate web content into your Qt application, you need to use a native web component. To make interacting with native contents easier, we are providing the Qt Android Extras module with a JNI convenience API.

iOS 也是如此,Apple 明确禁止使用除它们之外的其他 WebKit.

The same goes for iOS where Apple explicitly forbids the usage of other WebKits, apart from their.

Digia 目前正在开发新的网络引擎 应该在 Android 平台(和嵌入式 Linux)上可用,现在可以在 Qt 5.4 测试版.Qt webkit 的相同策略问题适用于 web 引擎,w.r.t.IOS.

Digia is currently working on a new web engine which should be available on the Android platform (and embedded Linux) and it is now available in the Qt 5.4 beta. The same policies issues of Qt webkit applies to the web engine, w.r.t. iOS.

为了简化开发人员的工作,在同一个新发布的 Qt 5.4 中,Digia 提供了 Qt WebView 的技术预览;再次引用他们的博客:

To ease developers work, in the same new release Qt 5.4, Digia provides a technology preview of Qt WebView; citing again their blog:

对于不允许分发 Qt WebEngine 的平台以及不需要成熟的 Web 引擎的用例,Qt 5.4 将引入名为 Qt WebView 的新模块的技术预览.它支持将底层操作系统的原生Web引擎嵌入到Qt中,目前支持Android和iOS.正因为如此,Qt WebView 也为简单的 Web 文档集成提供了一个方便的轻量级解决方案.Qt WebView 将作为单独的附加组件随 Qt 5.4 final 提供.

For platforms that do not allow distribution of Qt WebEngine as well as use cases where a full-blown web engine is not needed Qt 5.4 will introduce a technology preview of a new module called Qt WebView. It supports embedding the native web engines of the underlying operating system into Qt, and is currently available for Android and iOS. Because of this, Qt WebView also gives a convenient light-weight solution for simple web document integration. Qt WebView will be available with Qt 5.4 final as a separate add-on.

这篇关于移动端的 Qt WebKit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆