Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt 5.6 QWebEngine doesn't save cookies (only 30 seconds after starting)
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?
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?
A Former User last edited by
@Akaoray Hi! I don't know but there is this option
QWebEngineProfile::ForcePersistentCookies. Maybe this helps?
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.
Thanks for all, found it bag: