Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.6 QWebEngine doesn't save cookies (only 30 seconds after starting)

Qt 5.6 QWebEngine doesn't save cookies (only 30 seconds after starting)

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AkaorayA Offline
    AkaorayA Offline
    Akaoray
    wrote on last edited by A Former User
    #1

    I'am create easy Qt application named "webengine"

    pWebView = new QWebEngineView(this);
    pWebView->load(QUrl("http://technoz.ru"));
    pWebView->show();
    //On application close
    delete pWebView;
    

    The application creates a standard folder named "webengine" for storage and cookies. Domain sets a cookie for 24 hours. But after closing and opening the application again, the cookies lost. Сookies file created in the folder "webengine" - empty(I check it in sqlbrowser). But, if you hold on page 30 - 40 seconds, a cookie are saved.

    Why cookies are not saved realtime, and how save realtime?

    Thanks.

    1 Reply Last reply
    0
    • AkaorayA Offline
      AkaorayA Offline
      Akaoray
      wrote on last edited by
      #2

      During testing, it turned out that the QT(chromium) automatically stores the cookies through the browser in 30 seconds if the elapsed time is less, cookies are not saved. Is it possible to change this time? I tried to use the flag - --profiling-flush=5, but it does not help.

      Given that the browser must preserve storage(cookies) when you close the browser, but it does not, whether it is a bug QT?

      ? 1 Reply Last reply
      0
      • AkaorayA Akaoray

        During testing, it turned out that the QT(chromium) automatically stores the cookies through the browser in 30 seconds if the elapsed time is less, cookies are not saved. Is it possible to change this time? I tried to use the flag - --profiling-flush=5, but it does not help.

        Given that the browser must preserve storage(cookies) when you close the browser, but it does not, whether it is a bug QT?

        ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @Akaoray Hi! I don't know but there is this option QWebEngineProfile::ForcePersistentCookies. Maybe this helps?

        1 Reply Last reply
        0
        • AkaorayA Offline
          AkaorayA Offline
          Akaoray
          wrote on last edited by
          #4

          @Wieland said:

          QWebEngineProfile::ForcePersistentCookies

          Hi. Thanks for answer, but it does not help.

          Same problem have all QTWebEngineWidgets applications. If i compiler demobrowser from QT examples(using QWebEngineProfile::ForcePersistentCookies), and close it before 30 seconds of work, cookies are not saved.

          1 Reply Last reply
          0
          • AkaorayA Offline
            AkaorayA Offline
            Akaoray
            wrote on last edited by
            #5

            Thanks for all, found it bag:
            https://bugreports.qt.io/browse/QTBUG-52121

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved