Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

qt - Static build of QtWebEngine dependent application

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...