Static build of QtWebEngine dependent application

耗尽温柔 提交于 2019-12-29 08:51:38

问题


I have an application (audio player for http://vk.com) which uses OAuth 2.0 authorization. What i did was that i implemented QtWebEngineView object and used it to open an authorization page. Basically, it looks like currently i'm using quite a big class for such a little job. Anyway, i need to make a static build of my application — unfortunately, from my researches i've discovered people saying that making a static build of QtWebEngine-dependent application is not possible for some reasons.

Is this true? If so, are there any alternatives — maybe some classes made for OAuth 2.0 authentication?

Any help would be much appreciated!


回答1:


Yes, webengine can't be built statically. More info is here: http://lists.qt-project.org/pipermail/qtwebengine/2015-December/000264.html.

What you can do, is use C++ libraries (such as https://github.com/sirikata/liboauthcpp) for OAuth and add them to your project: http://doc.qt.io/qt-5/third-party-libraries.html. After that expose that to qml which is fairly simple: http://doc.qt.io/qt-5/qtqml-cppintegration-exposecppattributes.html

That way you can create simple authorization page using QML and authenticate using underlying C++ library.



来源:https://stackoverflow.com/questions/37093711/static-build-of-qtwebengine-dependent-application

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