QtWebEngine 依赖应用程序的静态构建 [英] Static build of QtWebEngine dependent application
问题描述
我有一个使用 OAuth 2.0 授权的应用程序(http://vk.com 的音频播放器).我所做的是我实现了 QtWebEngineView 对象并用它来打开授权页面.基本上,看起来目前我正在为这么小的工作使用相当大的课程.无论如何,我需要对我的应用程序进行静态构建——不幸的是,从我的研究中,我发现有人说由于某些原因,无法对依赖于 QtWebEngine 的应用程序进行静态构建.
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.
这是真的吗?如果是这样,是否有任何替代方案 - 也许是为 OAuth 2.0 身份验证制作的一些类?
Is this true? If so, are there any alternatives — maybe some classes made for OAuth 2.0 authentication?
任何帮助将不胜感激!
推荐答案
是的,不能静态构建 webengine.更多信息在这里:http://lists.qt-project.org/pipermail/qtwebengine/2015-December/000264.html.
Yes, webengine can't be built statically. More info is here: http://lists.qt-project.org/pipermail/qtwebengine/2015-December/000264.html.
您可以做的是使用 C++ 库(例如 https://github.com/sirikata/liboauthcpp) 用于 OAuth 并将它们添加到您的项目中:http://doc.qt.io/qt-5/third-party-libraries.html.之后将其暴露给相当简单的 qml:http://doc.qt.io/qt-5/qtqml-cppintegration-exposecppattributes.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
这样您就可以使用 QML 创建简单的授权页面并使用底层 C++ 库进行身份验证.
That way you can create simple authorization page using QML and authenticate using underlying C++ library.
这篇关于QtWebEngine 依赖应用程序的静态构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!