Qt5.6中的跨平台Webview [英] Crossplatform webview in Qt5.6

查看:1379
本文介绍了Qt5.6中的跨平台Webview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 10 64x上使用 Qt 5.6和MinGW 开发跨平台应用(台式机+移动版).

I am using Qt 5.6 with MinGW on Windows 10 64x for developing a cross platform app (desktop + mobile).

在Qt 5.5中,我可以使用WebKit制作一个跨平台应用程序以在我的应用程序中显示网页,并且可以在Windows,Android,iOs上使用它. 今天,我意识到我们不能再使用它了,我们既不能在Windows中使用QtWebView,也不能在MinGW中使用QtWebEngine.

In Qt 5.5, I could use WebKit to make a cross platform app for showing web pages in my app, and I could use it on Windows, Android, iOs... Today, I realized we can't use it anymore, we can't use QtWebView neither for Windows and also can't use QtWebEngine with MinGW.

因此,我很困惑:知道我想使用当前配置(适用于android台式机和移动版)显示网页时,该怎么办?

Thus, I am confused : knowing that I want to show a webpage using my current configuration (for android desktop and mobile version), what should I do?

是否有希望在下一个Qt版本中解决?

Is there a hope it will be solved in the next Qt versions?

修改: 即使我想运行Qt特殊的webview(微型浏览器)示例,它也会显示qmake错误:

Even when I want to run Qt special webview (minibrowser) example, it shows qmake error:

Project ERROR: Unknown module(s) in Qt: webenginewidgets
Project ERROR: Unknown module(s) in Qt: webview

推荐答案

您不能将MinGW用于带有Qt的Web引擎.据说此处:

You can't use MinGW for the web engine with Qt. It is said here:

Windows:Visual Studio 2013或Visual Studio 2015

Windows: Visual Studio 2013 or Visual Studio 2015

,您可以在此页面上找到更多信息.另外,MinGW不能与Qt WebEngine一起使用的事实也已报告为bug(例如 42725 ),并对其进行解释:

and you can find more information on this page. Also, the fact that MinGW can't be used with Qt WebEngine has been reported as bugs (e.g. 42725) and it is explained :

Chromium本身不会支持MinGW的可能性很小,同样,QtWebEngine团队要实现这一目标也需要大量工作.因此,Qt MinGW软件包将不完整是很可惜的.

It is very unlikely that Chromium itself will support MinGW, and likewise it would be a lot of work for the QtWebEngine team to achieve this. It is quite a shame that Qt MinGW packages will be incomplete because of this.

Chromium是QWebEngine集成的浏览器,而在QWebkit中集成的浏览器是WebKit,因此您不能再将MinGW用于QWebEngine.

Chromium is the browser integrated by QWebEngine, and in QWebkit the browser integrated was WebKit, hence the fact you can't use MinGW anymore for QWebEngine.

这篇关于Qt5.6中的跨平台Webview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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