Crossplatform webview in Qt5.6

一笑奈何 提交于 2019-12-05 20:48:29

问题


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

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.

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?

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

Edit: 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

回答1:


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

Windows: Visual Studio 2013 or Visual Studio 2015

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 :

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 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.



来源:https://stackoverflow.com/questions/36852346/crossplatform-webview-in-qt5-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!