[Interest] Using cookies with Image.source
Neil Williams
neil at copycopy.cc
Tue Aug 11 17:57:10 CEST 2015
You can use QQmlEngine::setNetworkAccessManagerFactory to make the Image
element use your own QNetworkAccessManager instances, which in turn you can
set a cookie store on that contains your session cookie.
http://doc.qt.io/qt-5/qqmlengine.html#setNetworkAccessManagerFactory
Note that setNetworkAccessManagerFactory
set QQmlNetworkAccessManagerFactory is not used by the QML Webview
component.
On Tue, Aug 11, 2015 at 4:20 PM, Jason H <jhihn at gmx.com> wrote:
> I have an application that needs a user to login and maintain a cookie.
> The AJAX features work just fine. But when I set the Image.source property
> to a URL that is protected and requires a session cookie, it gets a 401.
>
> How can I tell Image elements to use a cookie, the same cookie the AJAX
> login result got?
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150811/65cc6fb5/attachment.html>
More information about the Interest
mailing list