Details
-
Suggestion
-
Resolution: Fixed
-
P3: Somewhat important
-
None
Description
QtWebView lacks any support for managing cookies. Additionally, unlike platforms like Android, on iOS, the cookies are managed per view (in the case of iOS, WKWebView). This means that to be able to work with cookies you have to have a way of accessing the underlying component, which Qt WebView does not allow for.
In the attached code ( qtwebview-with-cookies.zip ), QtWebEngine plugin was modified so it has an interface for modifying cookies. No implemented cookies in the webrt backend, but there is an implementation for the android, ios and webengine backends. The new interface is in src/webview/qquickwebview_p.h:
Q_SLOTS: void setCookie(const QString & domain, const QString & name, const QString & value); void deleteCookie(const QString & domain, const QString & name); void deleteAllCookies(); Q_SIGNALS: void cookieAdded(const QString & domain, const QString & name); void cookieRemoved(const QString & domain, const QString & name);
Please consider adding this to Qt.