Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

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

    General and Desktop
    2
    5
    1002
    Loading More Posts
    • 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.
    • Akaoray
      Akaoray last edited by A Former User

      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 Reply Quote 0
      • Akaoray
        Akaoray last edited by

        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 Reply Quote 0
        • ?
          A Former User @Akaoray last edited by

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

          1 Reply Last reply Reply Quote 0
          • Akaoray
            Akaoray last edited by

            @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 Reply Quote 0
            • Akaoray
              Akaoray last edited by

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

              1 Reply Last reply Reply Quote 0
              • First post
                Last post