Results 1 to 2 of 2

Thread: Maybe I need reimplementing QNetworkCookieJar::allCookies() but don't know how

  1. #1
    Join Date
    Aug 2007
    Posts
    244
    Thanks
    42
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Maybe I need reimplementing QNetworkCookieJar::allCookies() but don't know how

    Hi,
    I'm experimenting with QNetworkAccessManager. I want to save in a file cookies of a request so I wrote:

    Qt Code:
    1. QList<QNetworkCookie> cookieslist = manager->cookieJar()->allCookies();
    To copy to clipboard, switch view to plain text mode 

    but since QNetworkCookieJar::allCookies() is protected I got error compiling.

    Perhaps I should reimplement this function but don't know how. Some tips?

    Thanks
    Giuseppe CalÃ

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Maybe I need reimplementing QNetworkCookieJar::allCookies() but don't know how

    You should subclass QNetworkCookieJar and implement storing cookies in the subclass. Then use QNetworkAccessManager::setCookieJar() to set your own cookie jar for the access manager.

Similar Threads

  1. Problem reimplementing QWidget::keyPressEvent
    By jiveaxe in forum Qt Programming
    Replies: 2
    Last Post: 22nd September 2008, 12:02
  2. Reimplementing The MousePressEvent for Graphics Item
    By ashishrai in forum Qt Programming
    Replies: 3
    Last Post: 25th May 2008, 20:11
  3. Reimplementing QApplication::notify( )
    By Rayven in forum Qt Programming
    Replies: 1
    Last Post: 15th May 2008, 17:22
  4. Reimplementing QApplication::notify()
    By Doug Broadwell in forum Qt Programming
    Replies: 5
    Last Post: 21st June 2007, 21:41
  5. Problem reimplementing QSpinBox in a custom widget
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 30th March 2006, 08:12

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.