Results 1 to 10 of 10

Thread: sending cookies using qt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: sending cookies using qt

    QNetworkCookieJar doesn't know anything about other browser application cookie caches, any more than IE knows about Chrome's cookies.

    If you want to persist the cookie jar then you do what the friendly manual says:
    QNetworkCookieJar does not implement permanent storage: it only keeps the cookies in memory. Once the QNetworkCookieJar object is deleted, all cookies it held will be discarded as well. If you want to save the cookies, you should derive from this class and implement the saving to disk to your own storage format.
    The class provides several methods to access the cookies in the jar to read or write to file.

    If you want the QNetworkCookieJar to be a proxy to some other browser's cookie cache then you should subclass and read (at least) the other browser's cookie cache. How you do that is entirely dependent on the other browser, and it may not work if the other browser's cookies (particularly transient session cookies) have not been written to somewhere you can access them.

    You could just have the user log in using a Qt web view or form and submit the login request via your QNetworkAccessManager to capture the cookies.

  2. The following user says thank you to ChrisW67 for this useful post:

    avipachar (8th December 2011)

Similar Threads

  1. Cookies....Again....
    By TJSonic in forum Qt Programming
    Replies: 7
    Last Post: 22nd November 2011, 09:00
  2. Replies: 0
    Last Post: 31st October 2011, 12:33
  3. Enable cookies in webkit
    By RzuF in forum Qt Programming
    Replies: 6
    Last Post: 10th October 2011, 07:37
  4. QNetworkAccessManager can't handle multiple cookies?
    By krippy2k in forum Qt Programming
    Replies: 5
    Last Post: 7th June 2009, 23:12
  5. I get only 1 of 4 cookies...
    By cherva in forum Qt Programming
    Replies: 33
    Last Post: 5th June 2009, 15:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.